Description
Greetings, I’m new to Zoom V2, although I have been using Zoom V1 API for a few months.
For this problem, I am using pure PHP 7.n to experiment with v2 commands.
I have a clientID and clientSecret.
For the very first test, get oauth token, works:
public function getToken(){
$params['params'] = array(
"grant_type" => "client_credentials",
"client_id" => $this->clientID,
"client_secret" => $this->clientSecret
);
$params['url'] = "https://zoom.us/oauth/token";
return $this->makeRequest($params);
}
…where $this->getToken()->access_token will return a long oauth token string.
Then I try to pass that oauth token to my next function, “createUser”, which looks like this:
public function createUser($params)
{
$params['url'] = "https://api.zoom.us/v2/users";
$params['userInfo'] = array(
"email" => "iuytfdfghjhg77@gmail.com",
"type" => 1,
"first_name" => "Gregory",
"last_name" => "George"
);
$params['params'] = array(
"access_token" => $this->getToken()->access_token,
"action" => "create",
"user_info" => $params['userInfo']
);
return $this->makeRequest($params);
}
…where $this->makeRequest($params) does a cURL, and returns the response object.
Error
The response from my “createUser” function looks like this:
stdClass Object(
[code] => 200
[message] => **Invalid api key or secret.**
)