# Set User We Analysis Permission Set

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

weDataSetUserPerm

# Functional description

Full set of user rights

# Note

  • If a user logs in for the first time, they need to set user permissions before they can get the login link.

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/wedata/wedata_set_user_perm?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 RequiredIntroductions
初始值_Token string yes Interface invokes the certificate, which is URL Parameters, non Body Parameters. useauthorizer_access_Token
uid string yes The unique identification of the user in the service provider system, can be mobile phone number, email, employee number, etc.
perm array yes Permission set
attribute type Required Introductions
perm_id string yes Permission set id
name string no Permission Set Name
desc string no Permission Set Description

# Return parameters

attribute type Introductions
errcode number Error code
errmsg string Error message

# Other Notes

  • uid The first login we analysis will scan the code to bind the WeChat ID. If the binding is the We analysis administrator or the We analysis data administrator, you can no longer modify the permissions through this interface, but you can unbind the interface.
  • Normal members can use this interface to modify permissions after binding.

# Call Example

Example Dxplaination: Setting up uid for The user of "example" Station-wide read-only and access analysis permissions

# Sample Request Data


{
	"uid": "example",
	"perm": [{
		"perm_id": "10001",
		"name": "Site-wide read-only access."
	}, {
		"perm_id": "10002",
		"name": "Access Analytics Permissions"
	}]
} 

# Return Data Example


{
	"errcode": 0,
	"errmsg": "OK",

} 

# 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
9900013 The uid is bound to the administrator or data administrator and does not have permission to modify its we analysis permissions Can be modified after unbinding
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
2. Check whether the list of permission sets for the merchant account contains the permission sets in the request parameter when setting the permission action
3. Does the uid have set permissions when logging in