Description
Just this week I started getting the error {‘code’: 124, ‘message’: ‘Invalid access token.’} when calling /chat/users/{userId}/messages/files endpoing with an oauth access token. I am using this endpoint to upload a newly generated file on a callback call to my backend. I event tried revoking the token and using your sample application (zoomapps-sample-js) to generate access tokens to call the ‘files’ endpoint. Nothing seems to work.
Error
{‘code’: 124, ‘message’: ‘Invalid access token.’} when calling both /chat/users/{userId}/messages/files and /chat/users/me/messages/files with a seemingly valid access token via Postman.
Hi @Staysmoon
Thanks for reaching out to the Zoom Developer Forum and welcome to our community!
Are you still experiencing this issue or were you able to solve it?
Please, let me know if there is anything I can do to support you
Best,
Elisa
Thanks @Staysmoon
Could you please share with me how are you generating the access token that you are trying to use to call our Chat endpoints?
Also, what kind of application are you using to generate those access tokens?
I am generating the token according to zoom’s guidelines (OAuth with Zoom) with the ‘chat_message:write’ scope. As for the app itself, I am building a document management app (office editor) so this endpoint is cruicial to make it working.
Hi @Staysmoon
Sorry for the late reply.
If you have not been able to fix this issue, I would recommend you look into this amazing guide written by one of my colleagues that is relevant to the issue you are facing:
Hi @tech5
Thanks for reaching out and welcome to our community.
Can you please verify that your server to server app has the right scopes added to call the endpoints you need?
Hi,
I posted an extensive (and detailed) reply for you, but it seems that your system removed it (two times ), now I have to start from the beginning.
All the endpoints return the same error. I added the right permission, but as I commented all the endpoints (I tried many), return the same 124 code.
We have many customers using the JWT app, and we need to migrate to the " server to server app " but at the moment I did not find any clear documentation for this thing, it looks a bit confusing and there are not examples for PHP Etc…
Updated:
This is how I call this endpoint, and how I pass the token I get from /oauth/token endpoint
I use Rester for testing the API (and postman as well). This is how I pass the token. Authorization: Bearer lVDFKdmFDZzp0SXdmUFBycDg3ekJNQ2hhMFdCejQ0cUI4OG1OA==
Note: Finally I saw many posts and I removed all of them leaving only this one.
Trying to attach images to this post I got this message many times “An error occurred: Sorry, you can’t embed media items in a post.” If I am not allowed to attach images, why does the editor show this option? How I can explain the problem if I cannot upload a single screenshot :).
Update:
I am using Rester App to test the endpoints, and after moving “Bearer” from the environment constant “Token”, it works, but now I get a new error “Invalid CORS request”, is it not possible to test the endpoint using Rester or Postman? Should I call the endpoints from the server in order to test them? I am trying the endpoint https://api.zoom.us/v2/users to get the users list.
Regards
Kind regards.