Appearance
User Authentication
Our user authentication endpoint provides an IdToken, an AccessToken, and a RefreshToken.
IdToken : The IdToken is essential for authenticating your subsequent API requests and has an expiry of 60 minutes. Please make sure to save this IdToken and use it as a Bearer token in the
Authorizationheader for other API interactions.RefreshToken: To maintain continuous access, the RefreshToken is used to generate a new IdToken whenever the current IdToken expires. The RefreshToken itself has an expiry of 1 year. Make sure to save the RefreshToken securely and use it with our refresh API to obtain new tokens before the current ones expire.
The following rate limit applies to this endpoint: 20 requests per second.
INFO
Your API keys carry many privileges, so be sure to keep them secure. Don't share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
API Endpoint
http
POST https://api.iimmpact.com/v2/tokenRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | No | The username of the user requesting the idtoken. |
password | string | No | The password of the user requesting the idtoken. |
Response 200
To test requests using your account, replace the sample username and password with your created account.
| Field | Type | Description |
|---|---|---|
AuthenticationResult | object | The result of the authentication process. |
AuthenticationResult.AccessToken | string | The access token generated for the user. |
AuthenticationResult.ExpiresIn | number | The time duration until the idtoken expires. |
AuthenticationResult.TokenType | string | The type of token being generated. |
AuthenticationResult.RefreshToken | string | The refresh token used to obtain a new access token. |
AuthenticationResult.IdToken | string | The generated idtoken for the user. |
Example Response:
json
{
"AuthenticationResult": {
"AccessToken": "eyJraWQiOiJRN21MeXUydEthSXlPQzNLUTk2RHJjejJWK0ZYdTNEZVwvb0hiOHFGcjlBRT0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1MzNlMjkwMy02ODAzLTQyNjgtOWNlOS02ZjRlOGYwNWUxMzkiLCJldmVudF9pZCI6ImI3ZDMzNjVkLTgxNTAtNDNhMi1hYTBjLWQ1MWJjODc1NDQxZCIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2NDA5MjE2OTAsImlzcyI6Imh0dHBzOlwvXC9jb2du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