Token Refresh Process

When an Access Token is not valid, describe the process of obtaining a new token.

When the Access Token is invalid, it occurs in the following cases:

  • Access Token expires : TOKEN_EXPIRED
  • Access Token authentication fail : INVALID_AUTH
  • Access Token is missing or decoding fails : UNAUTHORIZED

Token Refresh Process


  1. The customer initiates an API call to SentBiz.
  2. If an invalid token is detected, the customer receives a failure code.
  3. Upon receiving a failure code, the customer uses the Refresh Token to refresh the Access Token through the token refresh API.
  4. SentBiz validates the customer's Refresh Token and issues a new Access Token.
  5. The customer then uses the new Access Token to retry the SentBiz API call.

📘

Recommendations

Token expiration should be set relatively short, around 24 hours.

Implementing automated system-level handling for SentBiz API calls as described above is highly recommended.