cancel
Showing results for 
Search instead for 
Did you mean: 

Get userinfo given_name

New Community Member

Get userinfo given_name

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

6 REPLIES
Moderator

Re: Get userinfo given_name

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

Member

Re: Get userinfo given_name

Any news regarding the issue? 

We're affected by it as well.

When can we expect it to be solved?

Moderator

Re: Get userinfo given_name

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.

Member

Re: Get userinfo given_name

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

Moderator

Re: Get userinfo given_name

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.

Highlighted
Moderator

Re: Get userinfo given_name

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