We have created a custom skill and this has been published.
We are doing account linking. In the Amazon dev console we are using Amazon account for linking purpose.
Below are the details of the value we have put in the Alexa Skill Account linking configuration.
Security Provider Information
Grant Type: Auth Code Grant
Authorization URI: https://www.amazon.com/ap/oa
Access Token URI: https://api.amazon.com/auth/o2/token
Your Client ID: XXXXXXXX <LWA Security Profile Client ID>
Your Secret: XXXXXXXX <LWA Security Profile Client Secret>
Your Authentication Scheme: HTTP Basic
Please note, LWA Account linking is done successfully.
When we are invoking the skill through Alexa simulator its getting invoked successfully.
The ultimate goal is to get the Amazon username/phonenumber through which the account linking is done. We presume that we will get these details using Access Token value.
Issue what we are facing while trying to read the access token in the Lambda function. (Please note that this function are being developed using Alexa.NET NuGet package in C#)
We tried below methods:
public async Task<SkillResponse> FunctionHandler(SkillRequest input, ILambdaContext context)
var accessToken = input.Context.System.User.AccessToken;// Access Token is NULL
var personToken = input.Context.System.Person; // Person Class object is returned NULL
var accessSessionToken = input.Session.User.AccessToken; ;// Access Token is NULL