Getting the Tokens

Getting an access token from Cotter's SDK is as easy as setting a variable to `true`.

Getting Cotter's OAuth Tokens is very easy using our current authentication methods. You should only need to specify something like getOAuthToken = true in the SDKs.

You will get an additional field in the JSON response with all the tokens:

{
...
"oauth_token": {
"access_token": "eyJhbGciOiJFUzI1sInR5cC...",
"auth_method": "TRUSTED_DEVICE", // authentication method used
"expires_in": 3600, // expiry in seconds
"id_token": "eyJhbGciOiJFUz...",
"refresh_token": "60:79hbLxl3aTjWWgCcIRnn...",
"token_type": "Bearer"
}
}

Getting Tokens using the SDK

There are 3 places in the existing SDK where you can receive access tokens:

Getting Tokens using HTTP Request

You can also call Cotter's API to get the tokens.