# User PC Side Login

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

wedata_login

# Functional description

User PC Side Login

# Note

  • You need to set permissions for the invocation interface before logging on to set user permissions
  • Before logging in, the service provider needs to use the Settings login configuration interface to set the reverse check address

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/wedata/wedata_login?access_token=ACCESS_TOKEN 

# Third Party Invocation

  • The calling method and parameters are the same as HTTPS, only the calling token is different

  • The permission set id to which this interface belongs is: 18

  • After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant

# Request parameters

attribute type Required Introductions
access_Token string yes 初始值 URL Parameters, non Body Parameters. useauthorizer_access_Token
user_session string yes Server session, the session in which the user accesses the server's system
uid string yes The unique identification of the user in the service provider system, which can be a mobile number, email, employee ID, etc.
client_ip string yes User's external IP
user_agent string yes User's user_agent

# Return parameters

attribute typeIntroductions
base_resp object Return Information
attribute type Introductions
ret number Return code
err_msg string Return Information
redirect_url string We Analysis Login Link
expire_at number Expiration time (unix timestamp in seconds)

# Other Notes

# Special error code

Access the login link to get to, If the 100024 error code appears, it means that the user client obtained by the we analysis system at this time_ip和user_agent with Inconsistencies passed in service provider system calls api

# Login State Back Check

describe: this interface is provided by the service provider itself, when calling the login interface, it will check the user's uid and expiration time according to the login state of the user login in the service provider's system
address: ***(The server provides the HTTP request address, but the request parameters and return parameters need to follow the documentation.)
Request method:POST application/json
Request parameters

ParameterName type Is it necessary to Remarks
user_session string yes Server session, the session in which the user accesses the server's system

Return parameters

ParameterName type Is it necessary to Remarks
ret number yes Return code
err_msg string yes Return Information
uid string yes The unique identification of the user in the service provider system, which can be a mobile number, email, employee ID, etc.
expire_at number yes Expiration time (unix timestamp in seconds)

# Call Example

Example Dxplaination: HTTPS Request Example

# Sample Request Data


{
	初始值_session": "session_key",
	"uid": "test",
	"client_ip": "127.0.0.1",
	"user_agent": "Mozilla/5.0 (Windows NT 10.0 Win64 x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
} 

# Return Data Example


{
	"base_resp": {
		"ret": 0,
		"err_msg": "OK"
	},
	"redirect_url": "https://wedata.WeChat.qq.com/mp2/supplier/login?open_login=1&open_sid=xxxxxxxxxx",
	"expire_at": 1663818592
} 

# Error code

Error code Error code Solutions
-1 system error The system is busy, please wait for the developer to try again
9900004 Request parameter error Please double check the request parameter format
9900016 Operation without permission 1. Check the merchant we analyze whether the administrator has turned off the member management rights of the service provider during the permission-related operation
  1. Check whether the list of permission sets for the merchant account contains the permission sets in the request parameter when setting the permission action
  2. Does the uid have set permissions when logging in | | 9900018 | Illegal session | Please check if the session is correct. | | 9900019 | Session has expired | Regenerate session |