I had setup Alexa skill to use Flask-Ask. Skill works fine as expected. Now I need to get the user personal information like name,phone,email,address.So I had used the below code
@ask.intent('AskPermission')
def get_permission():
token=context.System.apiAccessToken
api_end_point=context.System.apiEndpoint
request_id=request.requestId
headers = {"Content-Type": "application/json",
# "X-Amzn-RequestId":request_id,
"Authorization": "Bearer {}".format(token)}
body = {
"version": "1.0",
"response": {
"card": {
"type": "AskForPermissionsConsent",
"permissions": [
"alexa::profile:email:read",
]
}
}
}
permission_result = requests.get('{api_end_point}/v2/accounts/~current/settings/Profile.email'.format(api_end_point=api_end_point), json=body, headers=headers)
I am getting 403 in response everytime.
I am testing it on alexa simulator.
I had enabled the permission inside the skills like below
So am I doing anything wrong here