Getting the error {'code': 124, 'message': 'Invalid access token.'} when using zoom ouath app. How to remove it?

Getting the error {‘code’: 124, ‘message’: ‘Invalid access token.’} when using zoom ouath app.

I am using oauth app to view channels, send message to channels, send private message etc

However I am getting zoom error “invalid access token” even after refreshing the token.

I even tried revoking the token followed by generating the token and then refreshing. Still getting the same error.

Please tell me why I am getting this error and how to remove it?

Hi @mailagent
Thanks for reaching out to the Zoom Developer Forum and welcome to our community, I am happy to help here!

Could you please make sure that you have the right scopes added to your app before authorizing and trying to call the API?

Yes, I have the right scopes added. The scopes I have are :

View current user’s chat channels/chat_channel:read
View and manage current user’s chat channels/chat_channel:write
View current user’s chat contact information/chat_contact:read
View current user’s chat messages/chat_message:read
View and manage current user’s chat messages/chat_message:write
View current user’s contacts/contact:read
View your user information/user:read
View and manage your user information/user:write
View user info/user_info:read
View user’s zak token/user_zak:read

I was able to view channels, send message to channels, send private message till 13 August 2022. However after that I am getting {‘code’: 124, ‘message’: ‘Invalid access token.’} .

I even created a fresh oauth app, in that too I am getting the same error.

Please tell me how to remove this error.

Interesting… @mailagent
Thanks for sharing more details with me.
could you please send me the email associated with your account in a Private Message so I can debug your issue further?

My email associated with my account is ----------

Please debug the issue further and tell me how to remove the error.

Thanks @mailagent
I have created an internal ticket (ZSEE-62181) about this issue
I will come back with an update as soon as I hear back from them
Cheers,
Elisa

Hi @mailagent
I will send you a private message with some updates

Hi Elisa,

After reading your private message instructions,
I removed the app from my account and added it again and tried calling the endpoint again. It returned me the access token. But when I tried to use it, to view channels, it gave the error again : {‘code’: 124, ‘message’: ‘Invalid access token.’}.

Please tell me how to remove the error.

Thanks for the update @mailagent
Let me look into this again

I just looked into your app and it looks like it is working now.
What endpoint are you calling that is throwing you this error?
Just to double check could you please add your app again?
thanks
Elisa

Hi Elisa,

I double checked and added my app again. This time it is working. The endpoints which I used were https://zoom.us/oauth/token for generating acces_token and https://api.zoom.us/v2/chat/users/me/channels for getting channels.

I will contact you in case I face any issues again.

Thank you

Amazing!!! @mailagent
I am happy to hear it works now!
Let me know if there is anything else you need

Cheers,
Elisa

Hi Elisa,

I am not able to send private messages, rest of the endpoints are working. I am getting the error "{“code”:300,“message”:“User does not exist”} for the private message endpoint “https://api.zoom.us/v2/chat/users/me/messages” even though the contact is present and right permissions are given to app.

I was able to send private messages earlier.

Please tell me how to remove this error for private messages.

Hi @mailagent
Thanks for sharing more details with me.
Please make sure that you are adding the query parameter at_contact when sending a private message to another contact within your account, or you could also try to_contact

Here is a link to our docs:

Hi Elisa,

I am using “to_contact” to send message to a contact. That gave the error {“code”:300,“message”:"User does not exist.} .

Then I also tried adding “at_contact” but then also I received the same error {“code”:300,“message”:"User does not exist}.

The user exists in my account. Stil I am getting this error.

Please tell me how to fix this error, at least for case 1 i.e. using to_contact only.

Hi @mailagent
Thanks for reaching out back to me! Can we please move to our private conversation again ?

Sure. I messaged you on private conversation. Please see.

Thanks! I will take it from there!