Paypal GetUserinfo only returning user_id

Ajoy
Contributor
Contributor

I want to get User info into my .net web applications. My code is below:

Dim Config As Dictionary(Of String, String) = New Dictionary(Of String, String)
            Config.Add("mode", "sandbox")
            Config.Add("connectionTimeout", "30000")
            Config.Add("requestRetries", "1")
            Config.Add("clientId", "xxxxxxx")
            Config.Add("clientSecret", "xxxxxxx")

Dim apicontext As APIContext = New APIContext()
    apicontext.Config = Config

Dim accesstoken As String = New OAuthTokenCredential(ClientId, ClientSecret, Config).GetAccessToken()

Dim userInfoParams As UserinfoParameters = New UserinfoParameters()
userInfoParams.SetAccessToken(accesstoken)

Dim userInfo As OpenIdConnect.Userinfo = OpenIdConnect.Userinfo.GetUserinfo(apicontext, userInfoParams)


Also I have set Identity service from Login with paypal option into paypal rest App."Information requested from customers" every thing is checked. But my code response only returns user_id. But I need all info. I am working in paypal sandbox mode What I am wrong ? Please suggest me. Thanks...

 

Login to Me Too
1 REPLY 1

MTS_Andre
Moderator
Moderator

Hi, are you using the get user info for the Identity REST API? Can you send the full REST request you process to get user info?

Here is what I refer to: Get User Information

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.