# Code: 124 , This API does not support client credentials for authorization

**URL:** <https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [October 30, 2023, 6:12am UTC](https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552 "2023-10-30T06:12:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![show10665](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@show10665](https://devforum.zoom.us/u/show10665)\
**Post date:** [October 30, 2023, 6:12am UTC](https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552/1 "2023-10-30T06:12:50Z")

</div>

### Format Your New Topic as Follows:

**API Endpoint(s) and/or Zoom API Event(s)**  
_Link the API endpoint(s) and/orZoom API Event(s) you’re working with to help give context._

**Description**  
We tried to convert JWT to OAuth, but encountered difficulties. I did not get the Token, but I called the Zoom Api to create a Meeting in response to this message. Instead, I used “account\_credentials” and “client\_credentials”. We hope to create a meeting or initiate a meeting in the background.

ApiURL:[https://api.zoom.us/v2](https://api.zoom.us/v2)  
requestURL:POST /users/{email}/meetings

**Error?**  
{  
“code”: 124,  
“message”: “This API does not support client credentials for authorization.”  
}

**How To Reproduce**  
The code is rather simple.

var Str\_token = @“XXXXXXX”;  
var client = new RestClient(@“[https://api.zoom.us/v2](https://api.zoom.us/v2)”);  
email = @“XXX@xxx.xxx.xx”;  
var request = new RestRequest($“/users/{email}/meetings”, Method.POST);  
request.RequestFormat = DataFormat.Json;  
request.AddJsonBody(jsonData);  
request.AddHeader(“content-type”, “application/json”);  
request.AddHeader(“authorization”, $“Bearer {Str\_token}”);

IRestResponse response = client.Execute(request);  
var content = JsonConvert.DeserializeObject(response.Content);

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [October 30, 2023, 7:14am UTC](https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552/2 "2023-10-30T07:14:25Z")

</div>

@show10665 , how are you generating your Str\_token ?

---

<div class="post-metadata">

**Author:** ![show10665](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@show10665](https://devforum.zoom.us/u/show10665)\
**Post date:** [October 30, 2023, 7:26am UTC](https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552/3 "2023-10-30T07:26:51Z")

</div>

> [@chunsiong.zoom](#):
>
> how are you generating your Str\_token ?

I used the following code to get Token.

```auto
string tokenUrl = @"https://zoom.us/oauth/token";
string clientId = "xxxx";
string clientSecret = "xxxx";
string redirectUri = "xxxx";
string AuthorizationBasic = Convert.ToBase64String(Encoding.UTF8.GetBytes(clientId + ":" + clientSecret));
RestClient client = new RestClient(new Uri(tokenUrl));
RestRequest request = new RestRequest();
request.Method = Method.POST;

request.AddHeader("Authorization", $"Basic {AuthorizationBasic}");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("grant_type", "client_credentials");
request.AddParameter("redirect_uri", redirectUri);
request.AddParameter("client_id", clientId);
request.AddParameter("client_seret", clientSecret);
IRestResponse response = client.Execute(request);

```

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [October 30, 2023, 9:06am UTC](https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552/4 "2023-10-30T09:06:29Z")

</div>

> [@show10665](#):
>
> `client_credentials`

@show10665 can i confirm if you are using Server to Server Oauth or Oauth?

---

<div class="post-metadata">

**Author:** ![show10665](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@show10665](https://devforum.zoom.us/u/show10665)\
**Post date:** [October 31, 2023, 1:25am UTC](https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552/6 "2023-10-31T01:25:38Z")

</div>

Server to Server Oauth and Oauth I’ve tried both and the results are still the same.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [October 31, 2023, 2:11am UTC](https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552/7 "2023-10-31T02:11:47Z")

</div>

@show10665,

If you are using Server to Server Oauth, here’s what I did in nodejs to get the bearer token

```auto
// Function to fetch a bearer token
async function fetchBearerToken() {
  try {
    // Create a Basic Authorization header with client credentials
    const credentials = Buffer.from(`${process.env.ZOOM_S2S_CLIENT_ID}:${process.env.ZOOM_S2S_CLIENT_SECRET}`).toString('base64');
    const apiUrl = `https://zoom.us/oauth/token?grant_type=account_credentials&account_id=${process.env.ZOOM_S2S_ACCOUNTID}`;
    
    // Define the token request parameters
    const tokenRequestData = {
      method: 'POST',
      url: apiUrl,
      headers: {
        'Authorization': `Basic ${credentials}`,
        'Content-Type': 'application/x-www-form-urlencoded',
      },
      
    };

    // Send the token request
    const response = await axios(tokenRequestData);

    // Extract the access token from the response
    const accessToken = response.data.access_token;
    // Return 
    return accessToken;
   
  } catch (error) {
    return error.message;
  }
}

```

---

<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 1, 2023, 6:03am UTC](https://devforum.zoom.us/t/code-124-this-api-does-not-support-client-credentials-for-authorization/97552/8 "2023-11-01T06:03:34Z")

</div>

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