When I go through the OAuth 2.0 process for a new user of my web app, I occasionally get a 400 error in "Step 3: Request an API token". The API is very simple so I cannot explain why it works most of the time but occasionally fails.
I'm calling the API from a server (Node.js), not from the web app. In my REST Configuration in the Clover Developer portal, the Default OAuth Response is set to 'Token'. The API call uses the following URL format:
I cannot recreate this problem with my production Clover account, and I have not found any pattern with users that get the 400 error. Their verification code value looks to be valid, the API call looks to be correctly formatted.
Could there be a timing issue in play here? I request the token immediately after I receive the code, so is a short delay needed before the Clover API is ready to handle the token request?
Any ideas would be helpful. I'm losing business because of this issue.