How can I check if my access token is valid?

Modified on Mon, 07 Nov 2022 at 04:25 PM

Access tokens are valid for 24 hours. You can view the information contained in an access token, including its expiry time, at https://jwt.io/. Your application can also base64 decode the access token to view this information.


If one of your applications sends a request to the Nexar API with a missing, invalid or expired token, a GraphQL response like the following will be returned:

{
  "errors": [
    {
      "message": "Token validation failed. Please provide a valid access token.",
      "locations": "...",
      "path": "...",
      "extensions": {
        "code": "AuthInvalidToken",
        "remote": "...",
        "schemaName": "..."
      }
    }
  ],
  "extensions": {
    "requestId": "..."
  }
}

If the token has expired, the AuthExpiredToken error code is returned and your application should request a new access token. If the token is missing or invalid, the AuthInvalidToken error code is returned, which may mean your application is using the token incorrectly.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article