0

I have set permission for Email in Authorisation request.

https://api.23andme.com/authorize/?redirect_uri=http://localhost:5000/receive_code/&response_type=code&client_id=""&scope=email rs123&select_profile=true

Using this url I have authorise the application. After this it redirecting me to redirect_uri and showing the code in request. Here localhost url showing Internal 505 error.

Using this code I have post the request to get token> Below is the response.

{

"access_token": "28515f8734566dc0377ee0496e7b2d7d",

"token_type": "bearer",

"expires_in": 86400,

"refresh_token": "77cbfa595ee11b8a8e9d03acb09ad9f2",

"scope": "email rs123"

}

Now I am trying to request>curl "https://api.23andme.com/3/account/" -H "Authorization: Bearer 28515f8734566dc0377ee0496e7b2d7d"

Response error is instead of this If I am trying the same with demo_oauth_token its giving the response with details.

{"error_description": "Access token has insufficient scope: basic, names, email", "error": "insufficient_scope"}

1 Answers1

1

You need to send encoded url.For example your request url should look like:

https://api.23andme.com/authorize/?redirect_uri=http://localhost:8000/receive_code/&response_type=code&client_id=CLIENT_ID&scope=email%20rs123&select_profile=true
4b0
  • 21,981
  • 30
  • 95
  • 142
jay thanki
  • 1,222
  • 1
  • 12
  • 18