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
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
create meeting: https://api.zoom.us/v2/users/me/meetings
How To Reproduce (If applicable)
Steps to reproduce the behavior:
- Post request to above endpoint with below header.
‘Authorization’ : ‘Basic <base64Encode(api_key:api_secret)>’ - After receiving response. retrieve the ‘access_token’.
- Make a callout for creating meeting(UserId being ‘me’) with header as follows
‘Authorization’ : ‘Bearer <access_token recieved>’ - 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.