/openserver/sns/jscode2session
Property | Type | Required | Description |
appid | string | True | Mini program appId. |
secret | string | True | Mini program appSecret. |
js_code | string | True | Code obtained during login. |
grant_type | string | True | Authorization type: use authorization_code |
Property | Type | Required | Description |
session_key | string | True | Session key. |
errmsg | string | True | Error message. |
openid | string | True | Unique user identifier. |
errcode | int32 | True | Error code. |
{"errcode": 40029,"errmsg": "invalid js_code","openid": "","requestId": "84574d84227943298cb25e26a6d2b816","session_key": "","unionid": ""}
/openserver/cgi-bin/token
Property | Type | Required | Note |
appid | string | True | Mini program appId. |
secret | string | True | Mini program appSecret. |
grant_type | string | True | Enter client_credential. |
Property | Type | Required | Note |
access_token | string | True | Access token. |
expires_in | number | True | Token validity period in seconds. Value range: usually 7200 seconds. |
{"access_token": "ATZrSqJXfZkAZVRIJxTNZJwyZLZJjPJhKpibbjuGgHpQzZwbCDPvGGfWKSbJlSMX","errcode": 0,"errmsg": "ok","expires_in": 7200,"requestId": "5486f23fd3b64c2c84c9798ead510aa7"}
/openserver/wxa/checksession
Property | Type | Required | Note |
access_token | string | True | Access token. |
openid | string | True | Unique user identifier. |
signature | string | True | User login state signature, obtained by signing an empty string with session_key. That is, signature = hmac_sha256(session_key, ""). |
sig_method | string | True | Hash method for user login state signature, currently only supports hmac_sha256. |
Property | Type | Required | Note |
errcode | number | True | Error code |
errmsg | string | True | Error message. |
Property | Type | Required | Note |
access_token | string | True | Access token. |
openid | string | True | Unique user identifier. |
code | string | True | temporary code |
{"access_token":"ATIfWyEpUVHcyGHHqCEspuuALGNyoBFpLwTNdRMLsdJAdJPEJHvrEYSlhZQtJojF","openid":"b642cf744a16d2010b60242ab6b7ded99a895a60e857a9dc17eadcb73f790cfd","code":"807636166d9c4155aacc7fbeae7b9bfa"}
Property | Type | Note |
errcode | number | Error code. |
errmsg | string | Error message. |
phone_info | object | Phone info |
phone_info.phoneNumber | string | Phone mumber |
{"errcode": 0,"errmsg": "ok","phone_info": {"phoneNumber": "xxxxxx"}}
Property | Type | Required | Note |
access_token | string | True | Access token. |
openid | string | True | Unique user identifier. |
code | string | True | temporary code |
{"access_token":"ATIfWyEpUVHcyGHHqCEspuuALGNyoBFpLwTNdRMLsdJAdJPEJHvrEYSlhZQtJojF","openid":"b642cf744a16d2010b60242ab6b7ded99a895a60e857a9dc17eadcb73f790cfd","code":"807636166d9c4155aacc7fbeae7b9bfa"}
Property | Type | Note |
errcode | number | Error code. |
errmsg | string | Error message. |
email_address | object | email_address |
email_address.emailAddress | string | emailAddress |
{"errcode": 0,"errmsg": "ok","email_address": {"emailAddress": "xxxxxx"}}