# Issue in Authentication, this is Urgent

**URL:** <https://devforum.zoom.us/t/issue-in-authentication-this-is-urgent/21696>\
**Category:** API and Webhooks\
**Created:** [June 18, 2020, 11:48am UTC](https://devforum.zoom.us/t/issue-in-authentication-this-is-urgent/21696 "2020-06-18T11:48:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahesh.biswas07](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mahesh.biswas07/32/9980_2.png) [@mahesh.biswas07](https://devforum.zoom.us/u/mahesh.biswas07)\
**Post date:** [June 18, 2020, 11:48am UTC](https://devforum.zoom.us/t/issue-in-authentication-this-is-urgent/21696/1 "2020-06-18T11:48:16Z")

</div>

**Description**  
So I’m using Salesforce. I want to create a meeting after a record is inserted in salesforce.  
So I make Zoom API call from the apex(Java Like) for creating the Zoom meeting and associate the meeting ID to the record created.  
I have achieved this using JWT app. But now due to some reasons, we have to use OAuth instead and I’m struggling to receive/generate token, that needs to be passed in order to make a callout to create Meeting

I tried with  
[https://api.zoom.us/oauth/token?grant\_type=client\_credentials](https://api.zoom.us/oauth/token?grant_type=client_credentials)  
for generating token and I got a valid response containing access\_token and token\_type

But when I was using the token to create meeting I’m getting the below response.  
{“code”:200,“message”:“Invalid api key or secret.”}

**Error**  
for creating meeting I’m getting this response  
{“code”:200,“message”:“Invalid api key or secret.”}

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
OAuth

**Which Endpoint/s?**  
OAuth generating Token: [https://api.zoom.us/oauth/token?grant\_type=client\_credentials](https://api.zoom.us/oauth/token?grant_type=client_credentials)  
create meeting: [https://api.zoom.us/v2/users/me/meetings](https://api.zoom.us/v2/users/me/meetings)

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. Post request to above endpoint with below header.  
‘Authorization’ : ‘Basic \<base64Encode(api\_key:api\_secret)\>’
2. After receiving response. retrieve the ‘access\_token’.
3. Make a callout for creating meeting(UserId being ‘me’) with header as follows  
‘Authorization’ : ‘Bearer \<access\_token recieved\>’
4. You will get this response.  
{“code”:200,“message”:“Invalid api key or secret.”}

**Additional context**  
After searching I found that the approach used to generate Access token is used for chat and not meeting.  
Is there any was we can use this approach for creating meeting because the callout will be made from server(Trigger) with no UI involved.  
I was using JWT(and it use to work fine) but they want to use OAuth and not JWT.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 23, 2020, 6:19pm UTC](https://devforum.zoom.us/t/issue-in-authentication-this-is-urgent/21696/2 "2020-06-23T18:19:40Z")

</div>

Hey @mahesh.biswas07,

You must use the grant\_type of `authorization_code` flow. Here are the instructions:

> **[OAuth 2.0 - Authorization - Documentation](https://marketplace.zoom.us/docs/guides/auth/oauth#step-2-request-access-token)**
>
> OAuth with Zoom
> 
> The Zoom API uses OAuth 2.0 to authenticate and authorize users to make requests. To setup access credentials and request scopes for yo...

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:24pm UTC](https://devforum.zoom.us/t/issue-in-authentication-this-is-urgent/21696/3 "2020-08-21T22:24:16Z")

</div>

Closed on August 21, 2020, 10:24pm UTC


