Get userinfo given_name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
We've been using login with PayPal functionality for our app in live environment for some time and we used profile information to fill the registration for users. We match first name and last name based on PayPal's given_name and family_name as described here https://developer.paypal.com/docs/api/identity/#openidconnect_userinfo
We discovered that we no longer receive given_name and family_name in response to GET userprofile request.
I checked scopes and my app settings and it doesn't seem to be changed. I'm adding all scopes described here: https://developer.paypal.com/docs/integration/direct/identity/attributes/
I'm able to receive other data, such as email, name, address of phone_number
Steps we use:
- Redirect user to https://www.sandbox.paypal.com/signin/authorize?client_id={my_sandbox_client_id}K&response_type=code...
- Make a POST request to /v1/identity/openidconnect/tokenservice
curl -X POST https://api.sandbox.paypal.com/v1/identity/openidconnect/tokenservice \ -H 'Authorization: Basic {base64 client_id:secret' \ -d 'grant_type=authorization_code&code={code_received_in_previous_step}'
- Make a GET request to /v1/identity/openidconnect/userinfo
curl -v -X GET "https://api.sandbox.paypal.com/v1/identity/openidconnect/userinfo?schema=openid" \ -H "Content-Type:application/json" \ -H "Authorization: Bearer {code_received_in_previous_step}"
After that I receive JSON with address, language, verified, phone_number, locale, zoneinfo, email_verified, name, email, user_id fields, but there's no given_name and family_name fields.
Were there any changes in this API that I'm not aware of? I tried looking for it, but it's not described in any doc or on any forum I searched.
I'd appreciate any help.
Thanks,
Maciej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works in django-allauth - I obtain:
{"user_id": "https://www.paypal.com/webapps/auth/identity/user/...", "name": "Firstname Lastname"}
so not only user_id but also name (and other information if I have right to obtain them).
Maybe try some other URLs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, but then the API only retrieves the full name. So getting only the given_name (or first name) is still not possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting this issue also. No full name or email but I get address info
When calling
- « Previous page
-
- 1
- 2
- Next page »
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Change the button from Sandbox to Production in PayPal Payments Standard
- The current address of the company in REST APIs
- PAYER_ACTION_REQUIRED returned for Capture intent when calling v2 checkout orders in Sandbox Environment
- Payment not automatically being captured, funds not transferred in Sandbox Environment
- How do i pass a customer ID number in the transaction in Sandbox Environment