文档中心 > API类目 > 云游戏API

alibaba.cloudgame.nuwa.userid.auth (女娲平台云游戏用户校验)

提供给云游戏做用户check

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
request_param CloudGameRequest 可选 入参model
  • └ action
  • String
  • 可选
  • AUTH_CHECK
  • AUTH_CHECK
  • └ front_app_key
  • String
  • 可选
  • 21422
  • 21422
  • └ account_token
  • String
  • 可选
  • token
  • token
  • └ version
  • Number
  • 可选
  • 1
  • 1
  • └ account_id
  • String
  • 可选
  • 2324
  • 23424

响应参数

名称 类型 示例值 描述
result Result 接口返回model
  • └ code
  • String
  • 0
  • code
  • └ message
  • String
  • OK
  • message
  • data
  • Data
  • 1234
  • 返回素材id
  • └ ttl
  • Number
  • 30
  • ttl
  • └ session_state
  • Number
  • 1
  • state
  • └ account_domain
  • Number
  • 0
  • domain
  • └ account_id
  • String
  • 400876666
  • accountId

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCloudgameNuwaUseridAuthRequest req = new AlibabaCloudgameNuwaUseridAuthRequest();
AlibabaCloudgameNuwaUseridAuthRequest.CloudGameRequest obj1 = new AlibabaCloudgameNuwaUseridAuthRequest.CloudGameRequest();
obj1.setAction("AUTH_CHECK");
obj1.setFrontAppKey("21422");
obj1.setAccountToken("token");
obj1.setVersion(1L);
obj1.setAccountId("2324");
req.setRequestParam(obj1);
AlibabaCloudgameNuwaUseridAuthResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_cloudgame_nuwa_userid_auth_response>
    <result>
        <code>0</code>
        <message>OK</message>
        <data>
            <ttl>30</ttl>
            <session_state>1</session_state>
            <account_domain>0</account_domain>
            <account_id>400876666</account_id>
        </data>
    </result>
</alibaba_cloudgame_nuwa_userid_auth_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部