Delay in Access Token Activation after OAuth2 Code Exchange

I am encountering an issue with the Patreon API OAuth2 authorization flow. Specifically, after exchanging the authorization code for an access token, I have noticed that the access token does not seem to be immediately effective.

When I attempt to use the access token synchronously in my program, there is a high likelihood that I will receive the following error message: “The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn’t understand how to supply the credentials required.”

However, when I introduce a 2-3 second delay before using the access token to call other API endpoints, the error message no longer appears, and the API behaves as expected. I have reviewed the documentation, but I couldn’t find any mention of this delay in access token activation.

Therefore, I would like to ask the community if this is a known issue. Is it possible that the access token obtained via the OAuth2 code exchange is not immediately effective? Or is there something else that I am missing? (Note: The access token’s scope is sufficient for the requested resources.)

Thank you in advance for your help.

Is this happening as of today?

I apologize for only seeing your message now. It seems that this situation is sporadic, as I recall that when we first integrated this API, I did not include blocking logic, but the API was functioning normally. The issue only appeared during testing the next day.

Right, but does this issue still occur as of today?