/openserver/sns/jscode2sessionProperty | Type | Required | Description |
appid | string | True | Mini program appId. |
secret | string | True | |
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. |
unionid | string | True | If a mini program team has multiple mini programs or mini games, UnionlD can be used to distinguish the uniqueness of users. As long as they are mini programs or mini games under the same mini program team, the user's UnionlD is unique. In other words, the same user, within the same app, will have the same UnionlD when logging in to different mini programs or mini games under the same mini program team. |
errcode | int32 | True | Error code. |
{"errcode": 40029,"errmsg": "invalid js_code","openid": "","requestId": "84574d84227943298cb25e26a6d2b816","session_key": "","unionid": ""}
/openserver/cgi-bin/tokenProperty | 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/checksessionProperty | 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 number. This parameter is obtained by calling the JS SDK wx.getPhoneNumber API |
{"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. This parameter is obtained by calling the JS SDK wx.getEmailAddress API |
{"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"}}
피드백