We are following Alexa documentation at https://developer.amazon.com/docs/custom-skills/link-an-alexa-user-with-a-user-in-your-system.html to link our user account with Alexa service.
We are using grant type : code as we need to use Smart Home Skill
We are testing API flow. Till step 5 everything is fine and a code is returned by our Oauth2 server. In step6 it is documented
"The Alexa service validates the returned information, then uses the
code to request an access token and refresh token pair from your authorization server (specified in the Access Token URI field in the developer portal). Both of these items are saved for the Alexa user"
Can someone please provide a sample sample request sent by Alexa service to obtain access token and refresh tokens by providing code and a response expected by Alexa in which access token and refresh token need to be provided by server.
We are not sure if the code parameter will be provided in req url or in the body of message. If in the msg body what is the format expected ? json?
A sample request and response to obtain access_token and refresh_token by sending code will be very helpful to proceed with the integration.
I hope Amazon have better documentation with examples such as this