Get userinfo given_name

tommi123
New Community Member

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:

  1. Redirect user to https://www.sandbox.paypal.com/signin/authorize?client_id={my_sandbox_client_id}K&response_type=code...
  2. 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}'
  3. 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

Login to Me Too
14 REPLIES 14

MTS_Andre
Moderator
Moderator

Hi, Engineers informed on that, thanks for pointing it out.

Login to Me Too

thegemini
Contributor
Contributor

Any news regarding the issue? 

We're affected by it as well.

When can we expect it to be solved?

Login to Me Too

MTS_Andre
Moderator
Moderator

Hi, make sure that when you login into the Dashboard and select your App, your App has the "Log In with PayPal" - "Information requested from customers" - "Personal Information" all flagged (Full Name etc..). If they are, then the first and last name will be returned in the response. Ran a few tests and they are returned.

Login to Me Too

thegemini
Contributor
Contributor

Thank you for reply. 

We've got checked every attribute in paypal settings

http://prntscr.com/iogav6

Despite that data we received doesn't contain given_name, but only full name. 

This is full data response we receive: 

 

[response (Varien_Object)] => Array
(
[language] => en_US
[verified] => true
[phone_number] => 9392019686
[locale] => en_US
[zoneinfo] => Europe/Berlin
[email_verified] => true
[name] => Vzale test
[email] => [deleted]
[birthday] => 1975-10-10
[user_id] => https://www.paypal.com/webapps/auth/identity/user/X-FoVImOvc7FHcerX2Z1awR3At5PYPhkiclTYSbXFpQ
)

Furthermore this setup worked for a few months, and suddenly both test env and production (separate accounts, separate servers, erc) stopped returning data they used to before. 

Scopes used are: openid email profile address phone

Login to Me Too

MTS_Andre
Moderator
Moderator

I see, thanks for the response sent, will double check this one and will write back, allow me to check this in details and will write back as soon as possible after investigating. Thanks.

Login to Me Too

MTS_Ciaran
Moderator
Moderator

@thegemini @tommi123 - Can you please PM the Client ID's and I'll check it out on my side. 

Login to Me Too

AndreiL
New Community Member

Any update on this? I'm having the same issues. 

 

I dissapointed with the docs provided by Paypal. Here we can see it is possible to get the given_name - https://developer.paypal.com/docs/api/identity/ - and here - https://developer.paypal.com/docs/integration/direct/identity/attributes/ - there is no way to do that.

Login to Me Too

GaëlRenoux
Contributor
Contributor

Hello,

 

I'm bringing this back up as we have the same problem. Will the given name and family name come back, or are they gone for good ?

Login to Me Too

tarest
Contributor
Contributor

I have the same problem.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.