# Getting {'code': 124, 'message': 'Invalid access token.'} when calling /chat/users/{userId}/messages/files. How to fix the problem?

**URL:** <https://devforum.zoom.us/t/getting-code-124-message-invalid-access-token-when-calling-chat-users-userid-messages-files-how-to-fix-the-problem/78461>\
**Category:** Chat\
**Created:** [November 8, 2022, 11:03am UTC](https://devforum.zoom.us/t/getting-code-124-message-invalid-access-token-when-calling-chat-users-userid-messages-files-how-to-fix-the-problem/78461 "2022-11-08T11:03:44Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [November 28, 2022, 10:31pm UTC](https://devforum.zoom.us/t/getting-code-124-message-invalid-access-token-when-calling-chat-users-userid-messages-files-how-to-fix-the-problem/78461/8 "2022-11-28T22:31:26Z")

</div>

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:

> [@Zoom OAuth 2.0 Proof Key for Code Exchange (PKCE) Flow](https://devforum.zoom.us/t/zoom-oauth-2-0-proof-key-for-code-exchange-pkce-flow/63830):
>
> Summary Zoom supports Proof of Key Code Exchange (PKCE), pronounced “Pixy”, industry - standard protocol for authorization when requesting user tokens. This offers better security by enabling clients to use a code challenge and code exchange as part of the initial user authorization request. See [rfc7636](https://tools.ietf.org/html/rfc7636) for details. What is PKCE? PKCE is an extension to the OAuth 2 spec. Its design aims to add an additional layer of security that verifies that the authentication and token exchange requests co…

---

_[View the full topic](https://devforum.zoom.us/t/getting-code-124-message-invalid-access-token-when-calling-chat-users-userid-messages-files-how-to-fix-the-problem/78461)._
