alipay.user.info.share(Alipay users information sharing based on authorization)

Authorization is required

The proxy call by third parties is supported

This API, together with the alipay.system.oauth.token API, is used to query the user information that is authorized to be shared.

Public parameters

Request URL

Environment HTTPS request URL
Production environment https://openapi.alipay.com/gateway.do

Publis request parameters

Parameter Type Required Max length Description Sample
app_id String Y 32 The app ID that Alipay assigns to the developer. 2014072300007148
method String Y 128 The API name. alipay.user.info.share
format String N 40 Only JSON is supported. JSON
charset String Y 10 Request encoding format. Such as utf-8, gbk, and gb2312. utf-8
sign_type String Y 10 The signature algorithm used by the merchant to generate the sign string. Currently, RSA and RSA2 are supported. RSA2 is preferred. RSA2
sign String Y 256 The sign string of the merchant’s request parameters. For details, see Signature. For details, see the example.
timestamp String Y 19 The time when the request is sent. Format: "yyyy-MM-dd HH:mm:ss”. 2014-07-24 03:07:50
version String Y 3 The API version. The value is fixed to be 1.0. 1.0
auth_token String N 40 For details, see User information authorization.
app_auth_token String N 40 For details, see Overview of the app authorization.

Public response parameters

Parameter Type Required Max length Description Sample
code String Y - The gateway return code. For details, see the gateway error code. 40004
msg String Y - The description of gateway return code. For details, see the gateway error code Business Failed
sub_code String N - The business return code. Refer to specific API documents for details. ACQ.TRADE_HAS_SUCCESS
sub_msg String N - Description of the business return code. Refer to the specific API documents for details. The transaction is paid.
sign String Y - Signature. For details, see the signature document. DZXh8eeTuAHoYE3w1J+POiPhfDxOYBfUNn1lkeT/V7P4zJdyojWEa6IZs6Hz0yDW5Cp/viufUb5I0/V5WENS3OYR8zRedqo6D+fUTdLHdc+EFyCkiQhBxIzgngPdPdfp1PIS7BdhhzrsZHbRqb7o4k3Dxc+AAnFauu4V6Zdwczo=

Response parameters

Parameter Type Required Max length Description Sample
user_id String Y 16 Users’ unique Alipay user ID 2088102150477652
avatar String Y 400 The URL of the user’s avatar. http://tfsimg.alipay.com/images/partner/T1uIxXXbpXXXXXXXX
province String Y 20 Province name. Anhui province
city String Y 20 City name. Anqing
nick_name String Y 50 User’s nickname. Alipay Xiao’er
is_student_certified String Y 1 Student or not? T or F.) T
user_type String N 2 User type(1/2)
  1. 1: Company account
  2. 2: Individual account
1
user_status String N 2 Userstatus(Q/T/B/W)
  1. Q: Users that has registered.
  2. T: Users that are authenticated.
  3. B: Users whose accounts are frozen.
  4. W: Users who have registered but not activated accounts.
T
is_certified String N 1 Pass the real-name authentication?
  1. T: Passed
  2. F: Not yet
T
gender String N 10 Gender
  1. F:Female
  2. M:Male
F

Request samples

https://openapi.alipay.com/gateway.do?timestamp=2013-01-01 08:08:08&method=alipay.user.info.share&app_id=4532&sign_type=RSA2&sign=ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE&version=1.0&auth_token=20130319e9b8d53d09034da8998caefa756c4006
//To ensure a secure communication, verify whether the sign value in the response sample is provided by Ant finance.

Response samples

Business error codes

Public error codes

Error code Description Solution
SYSTEM_ERROR System busy System error, please try again later.