Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Change Log

WayGee

  • Initial Creation

Jonathan

  • Best Practices

  • Pagination Implementation

Related Documents

Confluence Link

Include Page
Cognito Client Integration Guide
Cognito Client Integration Guide

...

  • Check for a 401 after every API request

    • Get a new token - once only

    • Retry the API request - once only

  • Protect your access tokens and refresh tokens

    • Once delivered to the client app, the tokens provide access to your information an the client app is responsible for keeping them safe

  • Access tokens are valid for 1 hr before requiring refresh via refresh token

  • Always use HTTPS rather than HTTP

  • API raises exceptions for many different reasons, such as invalid parameters, authentication errors, and connection failure. We recommend writing code that gracefully handles all possible API exceptions. See error codes page for a complete list.

  • Large data sets are paginated. Read the data in chunks following pagination implementation.

Token TTLs

The following are time-to-live (TTL) settings for token expiration. The JWT token has a claim (field) that needs to be checked to when it expires. It is expressed as a NumericDate measured in UTC time format.

Token

TTL

JWT Claim

Access Token

1 Hour

exp

Refresh Token

30 Days

exp

Pagination

Pagination is implemented on endpoints that contain potentially large result sets.

...