I’m converting a JWT application to the Server-to-Server OAuth method.
The response of the initial request returns 4 values:
access_token
token_type
expires_in
scope
Does the header format changes ?
Do we need to use the scope in any manner ?
With the access_token received using https://zoom.us/oauth/token I request an end point adding the following headers {'Authorization': 'Bearer {access_token}', 'Content-type': 'application/json'}
but the result is 400 error : {'code': 200, 'message': 'Invalid api key or secret.'}
Thank you for posting in the zoom developer forum --I’m happy to help here! As a start, can you share a screenshot of the code snippet used to handle the server-to-server request?
In the meantime, to help developers get started fast, we create some Server-to-Server OAuth samples. I’ve linked the sample apps below for your reference.
with httpx.Client(http2=True, headers=headers, verify=True) as client:
url = f'https://api.zoom.us/v2/users/{id}/meetings?\
page_number=1&page_size=300&type={meetingtype}'
r = client.get(url)
Thanks for sharing. It looks like you were able to get up and running. For reference, here is another simple Python script you can use to get the Access token with your server -to-server App credentials:
Welcome to the Zoom Developer Forum. For context, are you looking for your account id to use with server to -server OAuth? Or are you asking for general knowledge? If the latter, the Get a user API response will include the account id. If the former, when you create a Server-to-server app, you can find your account on the App credentials screen of your Marketplace App. Here is a screenshot of what that looks like :
Great question, @EVant ! You can use client_credentials or account_credentials with the Server-to-server. See our Server-to-Server OAuth support documentation for a detailed description of the difference between account_credentials and client_credentials
Thanks!! The reason I was having such a hard time is that I had made an OAuth app instead of a Server-to-server OAuth app. I didn’t realize they were different. Couldn’t figure out why it was giving me a refresh token…