Hi,
I am able to link Alexa smart home skill with Okta but facing issues while generating refresh-token.
Every time I am getting 400 response code from auth server with following response
{
"error": "invalid_grant",
"error_description": "The authorization code is invalid or has expired."
}
The Alexa account link is happening and I am getting the expected directive in my AWS Lambda
{
'directive': {
'header': {
'namespace': 'Alexa.Authorization',
'name': 'AcceptGrant',
'messageId': '7d00bf30-9a39-403a-bb29-442908691be2',
'payloadVersion': '3'
},
'payload': {
'grant': {
'type': 'OAuth2.AuthorizationCode',
'code': 'RHIbZhPmVnC...'
},
'grantee': {
'type': 'BearerToken',
'token': 'eyJraWQiOiJLYnJaVkQ0YXdqVUdyLVBXZm03MGNPUW9ramIyQ01wUlh1ODRSZF...'
}
}
}
}
but the request is failing when I am trying to call /token API to get the refresh token.
I am providing grant_type, code, scope and redirect_uri as a application/x-www-form-urlencoded body and providing base64 encoded ClientID:Client ID in the Authorization header.
Please guide me if I am missing something here.
Thanks
Rakesh Sharnagate