How many active access token can exist at the same time?

Hi,

Our application follows the Square OAuth flow to get access token, we want to give one access token to each POS device (which will use the access token to initialize Square Mobile Payment SDK).

However during our testing today, when our application called Square API to obtain access token with refresh token, for a short period the Square API returned http code 429 with below error, does it mean there is still some limit on how many active access tokens can exist at the same time? In that case, may I know the number?

{
  "message": "access token creation quota exceeded for merchant, please retry later",
  "type": "too_many_requests"
}

Thanks in advance.

Best Regards,
Shudong

There is no documented limit for the amount of access tokens you can create for any merchant. Receiving a 429 typically means you are calling the API too many times in quick succession than what the error message seems to read.

Regardless, the best practice is to re-use access tokens across devices and refresh them every 7 days. It is not recommended to create access tokens per device or per request.