Get Access Token
The Get Access Token is an API call sent to the Partner site from the Cisco Spaces - Partner Dashboard to initiate OAuth authorization. On receiving the authorization code, Cisco Spaces - Partner Dashboard invokes the <$OAuth Token URL> API to get the access token. The access token endpoint must validate the JSON payload parameters, which is sent as part of the request. It should check if the client_id and the client_secret values match the values defined on the Partner App > App Tile menu, while ensuring the code hasn’t expired.
Note | The OAuth Token URL is configured in the Partner App > App Tile section. Make sure to use the HTTPS protocol. |
-
“code”–<Alpha Numeric value>
For example: C8AB554D6F804B8EB6246D44D3DE4B46.
-
“grant_type”– authorization_code.
-
“state”– <Alpha Numeric UUID> For example: 0855E7EFE7124B538D455F0C5CEF2629.
-
“client_id”– dnaspaces
-
“client_secret"– <Alpha Numeric value>.
For example: 31e08c21136c9102cdee.
-
“redirect_uri”– https://partners.dnaspaces.io/partner/OAuthValidation
Data Parameter |
Description |
Allowed values |
code | The authorization code is a temporary code that the client will exchange for an access token. |
String |
grant_type |
This indicates that the application uses the authorization_code grant type. |
grant type |
state |
Cisco Spaces passes a UUID, which would be returned when invoking the redirect URL. For example: 0855E7EFE7124B538D432F0C5CEF2629. |
Alpha-numeric value |
client_id |
The Cisco Spaces application’s public identifier. |
Alpha-numeric value |
client_secret |
The client_secret ensures any request to access the token is only received from Cisco Spaces. |
Alpha-numeric value |
redirect_uri |
Informs the partner site to redirect the user to the specified URI after authentication. |
Valid URI |
{
"code": "C8AB554D6F804B8EB6246D44D3DE4B46",
"grant_type": "authorization_code",
"state": "0855E7EFE7124B538D455F0C5CEF2629",
"client_id": "dnaspaces",
"client_secret": "31e08c21136c9102cdee",
"redirect_uri": "https://partners.dnaspaces.io/OAuthValidation"
}
{
"access_token": <$JWT>,
"token_type": "Bearer",
"scope": "<partnerTenantID>"
}
Note:
The scope parameter refers to the Customer Tenant ID maintained by the partner.
The access_token parameter refers to the JSON Web Token (JWT),generated by the
partner using partner information such as the partner tenant Id, email, and so on.