Account does not enabled REST API
Hello,
I am contacting you because I get a 400 status response from you API, and I cannot figure out how to fix this issue.
Here is the whole process:
- My application is hosted on my localhost
- With a Zoom One Pro account, I created on the marketplace a Server-to-Server OAuth application (with well-configured scopes)
- Im my application, I am requesting a token from the OAuth application, which works just fine.
- I then use this token to POST a request to "https://api.zoom.us/v2/users/me/webinars", but get a 400 status code response from your API, with the following payload:
{
"code": 200,
"message: "Account does not enabled REST API."
}Here is how I am performing my test request:
$response = Http::withToken($this->token)->post("https://api.zoom.us/v2/users/me/webinars", [
'agenda' => Str::uuid(),
'schedule_for' => '***********',
'start_time' => now()->addWeek()->format('Y-m-d\TH:i:s\Z')
]);Token obtained as follow:
/**
* Request's API access token if needed.
*
* @return void
*/
private function authenticate(): void
{
if ($this->token && $this->tokenValidUntil->isFuture()) {
return;
}
$response = Http::asForm()->post('https://zoom.us/oauth/token', [
'client_id' => config('zoom.client.id'),
'client_secret' => config('zoom.client.secret'),
'grant_type' => 'client_credentials',
]);
$this->token = $response->json('access_token');
$this->tokenValidUntil = now()->addSeconds($response->json('expires_in'));
}
Can you please help me figure out what is going wrong ?
Regards,
