j9九游会登录/ 云商店/ / / / / 用户授权同步
更新时间:2025-11-13 gmt 08:00

用户授权同步-j9九游会登录

接口说明

  • 管理员被授权管理某企业后,登录到华为云买家中心控制台,对企业内用户授权该企业已绑定的应用,云商店异步调用该接口请求商家同步该企业应用的用户授权信息,商家接口需要执行授权信息同步,保存用户授权信息,并返回通知云商店。
  • 针对用户授权同步场景接口调用失败的情况,由企业管理员选择是否要继续进行同步。并用短信或邮件的形式通知商家接口调用失败。
  • 商家的服务器在处理接口请求时,需要做好幂等性处理。

    对于同一个实例,相同的租户,相同的应用,相同的username,要支持多次请求新增,或者删除,多次新增不应产生新的数据,且需要返回成功,如果是删除,多次删除也需要返回成功,不能因已删除返回失败,删除时不需要校验(创建实例)接口产生的实例是否存在。

租户同步流程如下图所示:

请求方法:post

接口url:生产地址 固定子路径,其中固定子路径为/produceapi/v2/authsync;

接口示例:生产地址为https://example.isv.com,则接口url为https://example.isv.com/produceapi/v2/authsync,固定子路径商家无需手动拼接。

body请求参数

参数

必选

参数类型

描述

instanceid

m

string(64)

说明:

卖家申请应用凭证的时候传空,买家必传。

tenantid

m

string(64)

租户id,与租户同步的接口租户id保持一致,这个id是买家

appid

m

string(64)

应用id,与应用同步的应用id保持一致的

userlist

m

list

参考如下user类型定义表

currentsynctime

m

string

默认时区东8区,时间格式:20220420114117642

flag

m

integer(2)

0-删除 1-新增 2-修改 3-取消授权

testflag

m

integer(2)

0-生产正式数据 1-调测数据

timestamp

m

string

默认时区东8区,时间格式:20220420114117642

user类型定义

参数

必选

参数类型

描述

username

m

string(64)

联营账号

name

m

string(64)

账号名称

orgcode

m

string(64)

用户归属的部门编码

position

o

string(64)

职位

employeecode

o

string(64)

工号

employeetype

o

integer(11)

人员类型(1:正式 2:实习 3:劳务派遣 4:劳务外包)

role

m

string(32)

角色,user-普通用户,admin-管理员

enable

m

string(8)

账号可用状态,true-启用,false-禁用

mobile

o

string(32)

用户手机号

email

o

string(128)

用户邮箱地址

workplace

o

string(256)

工作所在地

entrydate

o

string(20)

入职时间(yyyy-mm-dd)

响应参数

参数

必选

参数类型

描述

resultcode

m

string(6)

响应码, 具体请参见调用结果码说明

resultmsg

o

string(255)

响应信息

示例:

post https://example.isv.com/produceapi/v2/authsync
content-type: application/json
x-sign: 11c4cd6279191de931def5c51531dffa9d37969f4e356b8a3a6d8de4fb357a48
x-timestamp: 1680508066618
x-nonce:50d83fdecaed6ccd8ef597f2a577950527928ba287d04e6036e92b2806fd17da
{"instanceid": "huaiweitest123456","tenantid": "68cbc86ab******92f36422fa0e","appid": "ksid******34456","userlist":[{"username":"zhangsan01@example.com","name":"张三","position":"系统管理员","orgcode":"123456789","role":"admin","enable":"true"}]," currentsynctime": "20220413093539534","flag": 1,"testflag": 0,"timestamp": "20220413093539534"}
响应示例:
http/1.1 200 ok  
content-type: application/json
{
" resultcode": "000000",
" resultmsg": "success"
}

相关文档

网站地图