Retrieve Access Token
Get an Access Token
POST /token
Exchange the authorization code for an access token, as defined in the OIDC Specification.
Authorization
Authorization for this endpoint is done using HTTP Basic Authentication using the client_id and client_secret as username and password respectively.
Example request:
curl --request POST
--url https://controller.myoneid.co.uk/token
--header 'Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ='
--header 'Content-Type: application/x-www-form-urlencoded'
--data grant_type=authorization_code
--data code=<code>
x
POST /token HTTP/1.1
Host: controller.myoneid.co.uk
Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&code=SplxlOBeZQQYbYS6WxSbIA
Example response
{
"access_token":"2f1f65ea-1954-4bbc-81bf-e16582b143b3",
"token_type":"Bearer",
"expires_in":300,
"id_token":"eyJhbGciOiJQUzI1NiIsImtpZCI6ImhWVktTd..."
}
Was this page helpful?