OAuth API request parameters
-
- UpdatedAug 1, 2024
- 2 minutes to read
- Xanadu
- Platform Security
Learn about the OAuth API request parameters that access token requests use.
Requests Using User Credentials
The instance requires clients to provide user login credentials when first authorizing the client or when authorizing the creation of a new refresh token. This type of request always returns two tokens:
- An access token
- A refresh token
The instance verifies that the user is active, not currently locked out, and has an interactive session. If any of these conditions are false, the instance does not produce an access token. Access requests made within the expiration time of the access token always return the current access token.
The following example illustrates requesting an access token with a set of user credentials (Spaces have been added to improve readability).
Requests Using a Refresh Token
The instance can use an existing refresh token to create a new access token. This type of request returns only an access token. The instance confirms that the refresh token has not expired before generating a new access token. Access requests made within the refresh token expiration time always return the current refresh token. Transmitting refresh tokens is generally more secure than transmitting user credentials. The following example illustrates requesting an access token with an existing refresh token (Spaces have been added to improve readability).