Paypal userinfo仅返回user_id

时间:2018-01-20 12:11:36

标签: vb.net paypal userinfo

我正在使用vb.net Web应用程序。 我希望通过paypal凭证获得p​​apyal用户信息。 我的代码如下:

Dim url As String = "https://api.sandbox.paypal.com/v1/oauth2/token/userinfo?schema=openid"
            Dim req As HttpWebRequest = DirectCast(WebRequest.Create(url), HttpWebRequest)
            req.ContentType = "application/json"
            req.Headers.Add("Authorization", accesstoken)
            req.Method = "GET"
            Dim responseData As String = ""
            Dim Response As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse)
            Using reader As StreamReader = New StreamReader(Response.GetResponseStream())
                responseData = reader.ReadToEnd()
            End Using

响应仅返回User_id。

user_id: https://www.paypal.com/webapps/auth/identity/user/.............

但想获得用​​户的所有信息。 怎么可能?

0 个答案:

没有答案