# This API does not support client credentials for authorization while migrating from jwt to oauth

**URL:** <https://devforum.zoom.us/t/this-api-does-not-support-client-credentials-for-authorization-while-migrating-from-jwt-to-oauth/96564>\
**Category:** Ionic\
**Tags:** video-sdk\
**Created:** [October 11, 2023, 4:41am UTC](https://devforum.zoom.us/t/this-api-does-not-support-client-credentials-for-authorization-while-migrating-from-jwt-to-oauth/96564 "2023-10-11T04:41:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dealmoney](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@dealmoney](https://devforum.zoom.us/u/dealmoney)\
**Post date:** [October 11, 2023, 4:41am UTC](https://devforum.zoom.us/t/this-api-does-not-support-client-credentials-for-authorization-while-migrating-from-jwt-to-oauth/96564/1 "2023-10-11T04:41:40Z")

</div>

while trying to migrate authentication code from JWT token to oauth we are getting following error message:  
data: {  
code: 124,  
message: ‘This API does not support client credentials for authorization.’  
}  
}  
}  
(node:7120) UnhandledPromiseRejectionWarning: Error: Request failed with status code 401

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 11, 2023, 1:59pm UTC](https://devforum.zoom.us/t/this-api-does-not-support-client-credentials-for-authorization-while-migrating-from-jwt-to-oauth/96564/2 "2023-10-11T13:59:12Z")

</div>

> [@dealmoney](#):
>
> This API does not support client credentials for authorization

Hi @dealmoney , I have seen this with developers attempting to use Server-to-Server OAuth incorrectly:

> [@Error "This API does not support client credentials for authorization." when trying to call an endpoint with Server-to-Server OAuth App credentials](https://devforum.zoom.us/t/error-this-api-does-not-support-client-credentials-for-authorization-when-trying-to-call-an-endpoint-with-server-to-server-oauth-app-credentials/85028/9):
>
> @lamaisondessavoirs if you are using user authorized OAuth, please use the method mentioned here [[OAuth for user authorized apps](https://developers.zoom.us/docs/integrations/oauth/)] Use " grant\_type as “authorization\_code” instead of client\_creentials

> [@This API does not support client credentials for authorization](https://devforum.zoom.us/t/this-api-does-not-support-client-credentials-for-authorization/94848):
>
> Hello, I am attempting to update to the OAuth from the JWT and ran into a problem. I have created a server-to-server-oauth app and have the keys. I can retrieve a token but when I try to use the token, it returns the error, “This API does not support client credentials for authorization.” From what I can find in the forums, I need to change the grant type from “client\_credentials” to “account\_credentials”. However, that returns “invalid request” This is in PHP, and I am using the package “leag…

Please note that Meeting SDK JWT is different from the deprecated JWT app-type. Meeting SDK JWT is still valid. Auth directions are here: [Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/c/6cc88b827376ce6c1c3946442d3519c1e7308747.png)

---

<div class="post-metadata">

**Author:** ![dealmoney](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@dealmoney](https://devforum.zoom.us/u/dealmoney)\
**Post date:** [October 13, 2023, 12:33pm UTC](https://devforum.zoom.us/t/this-api-does-not-support-client-credentials-for-authorization-while-migrating-from-jwt-to-oauth/96564/4 "2023-10-13T12:33:06Z")

</div>

We are getting below error while creating meeting by using sever to server auth token.

Error: data: { reason: ‘Bad Request’, error: ‘invalid\_request’ }

Our meeting Creation Funtion:  
async function createZoomMeeting(accessToken) {  
try {  
const meetingData = {  
topic: ‘Sample Meeting’,  
type: 2, // 2 for scheduled meeting  
};

```
const response = await axios.post(
  'https://api.zoom.us/v2/users/'+'test@gmail.com'+'/meetings',
  meetingData,
  {
    headers: {
      Authorization: `Bearer ${accessToken}`,
    },
  }
);
  console.log("meetingssssssss",response);
return response.data;

```

} catch (error) {  
console.error(‘Error creating Zoom meeting:’, error);  
throw error;  
}  
}

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [October 13, 2023, 3:50pm UTC](https://devforum.zoom.us/t/this-api-does-not-support-client-credentials-for-authorization-while-migrating-from-jwt-to-oauth/96564/5 "2023-10-13T15:50:09Z")

</div>

HI @dealmoney ,

Can you confirm you have a valid token?

With a valid S2S token, can you successfully make the request in Postman? [Postman](https://www.postman.com/zoom-developer/workspace/zoom-public-workspace/request/22097587-9cab327f-7634-44af-9ee0-1b49f6a6572f)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 13, 2023, 1:50am UTC](https://devforum.zoom.us/t/this-api-does-not-support-client-credentials-for-authorization-while-migrating-from-jwt-to-oauth/96564/6 "2023-11-13T01:50:56Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
