Getting access to raw JSON returned from Oauth (facebook for example)

I have the integration between AWS Alexa Skill, Auth0, and Facebook working and can see the JSON that is being stored as raw JSON by Auth0 for my test user, but I’m having trouble finding code samples on how to get access to the JSON attributes inside the Alexa skill.

Specifically, I want the name and email of the user (which I can see in the JSON). Can anyone point me in the direction of the API or ideally a sample of what I need to do to access them?

I’m setting the Alexa skill up using node.js (hosted mode).

Thanks

Hi @jerry.derrick,

Welcome to the Community!

There are a few options for getting the user’s profile information. When the user authenticates, the application is issued an Access Token and ID Token.

You could decode the ID Token using a JWT verification library (example ID token) or you can use the Access Token to retrieve profile information using the Authentication API.

If you are using the NodeJS passport-auth0 package, then you can follow the QuickStart’s example to access the profile information from req.user.

@stephanie.chamblee thanks for the quick reply :slight_smile:

I’ll give it a shot.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.