鲁大师

游戏对接文档


端游对接文档

<p>[TOC]</p> <table> <thead> <tr> <th>更新日期</th> <th>更新说明</th> <th>版本</th> <th>作者</th> </tr> </thead> <tbody> <tr> <td>2021-03-05</td> <td>创建文档</td> <td>1.0</td> <td>冯兴鑫</td> </tr> <tr> <td>2021-03-09</td> <td>增加充值文档</td> <td>1.01</td> <td>冯兴鑫</td> </tr> <tr> <td>2021-03-22</td> <td>游戏方获取登陆参数</td> <td>1.02</td> <td>冯兴鑫</td> </tr> <tr> <td>2021-04-09</td> <td>因防沉迷需要,增加上下线数据传输接口</td> <td>1.03</td> <td>冯兴鑫</td> </tr> <tr> <td>2021-06-30</td> <td>增加游戏内实名认证接口</td> <td>1.04</td> <td>冯兴鑫</td> </tr> </tbody> </table> <h1>接口要求和规范</h1> <ul> <li>参数 time 为Unix 时间戳(January 1 1970 00:00:00 GMT 起的秒数) ,单位为秒</li> <li>编码统一使用 UTF-8</li> <li>参数sign里的md5 加密的“+”号是字符串链接符号,并且要把md5后的字符串转成小写</li> <li>key双方协定或是一方处理完知会另一方</li> <li>接口返回errno=0表示成功,其他表示失败</li> </ul> <h1>游戏方获取登录参数</h1> <h4>接口说明:</h4> <ul> <li>玩家点击进入游戏后,游戏方请求平台接口,获得登录信息并启动游戏。支持直接跳转URL地址和返回JSON数据两种方式。</li> </ul> <h4>请求方式:</h4> <ul> <li><code>GET</code></li> </ul> <h4>请求地址:</h4> <ul> <li><code>https://wan.ludashi.com/client/play/{gid}?s={sid}&amp;amp;get_url={0|1}</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>是否必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>gid</td> <td>String</td> <td>必须</td> <td>平台的游戏ID,由平台提供</td> </tr> <tr> <td>s</td> <td>string</td> <td>必须</td> <td>平台区服ID,平台应至少配置1个区服</td> </tr> <tr> <td>get_url</td> <td>string</td> <td>否(默认0)</td> <td>1:直接跳转登录地址(url);0:返回JSON</td> </tr> </tbody> </table> <h4>返回参数示例:</h4> <pre><code>{     &amp;quot;errno&amp;quot;: 0,     &amp;quot;msg&amp;quot;: &amp;quot;成功&amp;quot;,     &amp;quot;data&amp;quot;: {         &amp;quot;uid&amp;quot;: &amp;quot;xxx&amp;quot;,         &amp;quot;platform&amp;quot;: &amp;quot;ludashi&amp;quot;,         &amp;quot;gid&amp;quot;: &amp;quot;tlzpc&amp;quot;,         &amp;quot;sid&amp;quot;: &amp;quot;1&amp;quot;,         &amp;quot;time&amp;quot;: &amp;quot;1669097471&amp;quot;,         &amp;quot;fcm&amp;quot;: &amp;quot;1&amp;quot;,         &amp;quot;sign&amp;quot;: &amp;quot;xxx&amp;quot;,         &amp;quot;url&amp;quot;: &amp;quot;?uid=xxx&amp;amp;platform=ludashi&amp;amp;gid=tlzpc&amp;amp;sid=1&amp;amp;time=1669097471&amp;amp;fcm=1&amp;amp;sign=xxx&amp;quot;     } } # errno=&amp;gt;0:表示成功</code></pre> <h1>登录接口</h1> <h4>接口说明</h4> <ul> <li>玩家在平台选择游戏区并登陆游戏时,平台将相关信息通过该登录接口发给游戏验证,待验证通过后将会引导玩家进入游戏界面,验证失败则会跳回平台出错页面(例如:官方网站)。</li> </ul> <h4>请求方式:</h4> <ul> <li><code>GET</code></li> </ul> <h4>请求地址示例:</h4> <ul> <li><code>http://{$host}/{$api}?uid=xxx&amp;amp;platform=ludashi&amp;amp;gid=xxx&amp;amp;sid=1001&amp;amp;time=1605507639&amp;amp;fcm=1&amp;amp;sign=a782e874f87e1469c29d799b97dc7d1d</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>是否必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><a href="http://{$host}/{$api">http://{$host}/{$api</a>}</td> <td></td> <td></td> <td>游戏域名,最好是http。接口地址中如果有区服变量,区服ID用字符串{$sid}代替</td> </tr> <tr> <td>uid</td> <td>string</td> <td>必须</td> <td>玩家在平台的用户id</td> </tr> <tr> <td>platform</td> <td>String</td> <td>必须</td> <td>固定传ludashi, 标识平台</td> </tr> <tr> <td>gid</td> <td>string</td> <td>必须</td> <td>约定的game id, 如枪魂gid=qh,不参与sign验证</td> </tr> <tr> <td>sid</td> <td>int</td> <td>必须</td> <td>所属服务器,一区填写1,二区填写2,依此类推,</td> </tr> <tr> <td>time</td> <td>int</td> <td>必须</td> <td>平台服务器的时间戳(为长整数,单位为秒),游戏需根据此参数判断,请求参数是否过期</td> </tr> <tr> <td>fcm</td> <td>int</td> <td>必须</td> <td>防沉迷:1 已成年通过防沉迷;2 未成年,未满18岁;0 未填写身份信息</td> </tr> <tr> <td>sign</td> <td>String</td> <td>必须</td> <td>md5(uid+platform+sid+time+fcm+key) 这里传递的md5字串为小写字母, 这里的key是表示平台和游戏双方提前协商约定好的密钥</td> </tr> </tbody> </table> <h1>角色查询</h1> <h4>接口说明</h4> <ul> <li>查询用户角色是否存在,并且返回玩家角色信息。</li> </ul> <h4>请求地址示例:</h4> <ul> <li><code>http://{$host}/{$api}?uid=xxx&amp;amp;platform=ludashi&amp;amp;gid=xxx&amp;amp;sid=1&amp;amp;time=1603333700&amp;amp;sign=2d5f3d19c2169c53aa01b07cd2c92de2</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><a href="http://{$host}/{$api">http://{$host}/{$api</a>}</td> <td></td> <td></td> <td>查角接口地址。接口地址中如果有区服变量,区服ID用字符串{$sid}代替</td> </tr> <tr> <td>uid</td> <td>string</td> <td>必须</td> <td>平台用户标识</td> </tr> <tr> <td>platform</td> <td>String</td> <td>必须</td> <td>固定传ludashi, 标识平台</td> </tr> <tr> <td>gid</td> <td>string</td> <td>必须</td> <td>约定的game id, 如枪魂gid=qh,不参与sign验证</td> </tr> <tr> <td>sid</td> <td>int</td> <td>必须</td> <td>所属服务器,一区填写1,二区填写2,依此类推</td> </tr> <tr> <td>time</td> <td>int</td> <td>必须</td> <td>时间戳单位为秒</td> </tr> <tr> <td>sign</td> <td>String</td> <td>必须</td> <td>md5(uid+platform+sid+time+key)这里传递的md5字串为小写字母, 这里的key是表示平台和游戏双方提前协商约定好的密钥</td> </tr> </tbody> </table> <h4>返回参数示例:</h4> <pre><code>{ &amp;quot;errno&amp;quot;: 0, &amp;quot;data&amp;quot;: { &amp;quot;name&amp;quot;: &amp;quot;角色名&amp;quot;, &amp;quot;level&amp;quot;: &amp;quot;1&amp;quot; }, &amp;quot;msg&amp;quot;: &amp;quot;提示&amp;quot; } # errno =&amp;gt; 0表示成功 # name 和 level 必须返回</code></pre> <h1>查询防沉迷&amp;VIP&amp;绑定手机</h1> <h4>接口说明:</h4> <ul> <li>本接口用于查询玩家的会员信息。</li> <li>该接口使用到的加密key,不同于登陆注册的key需要和运营核对。</li> <li>参数中的gid需要和运营核对</li> </ul> <h4>请求方式:</h4> <ul> <li><code>POST | GET</code></li> </ul> <h4>请求地址:</h4> <ul> <li><code>http://wan.ludashi.com/openApi/platformVipInfo</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>说明</th> <th>必填</th> <th>类型</th> <th>备注</th> </tr> </thead> <tbody> <tr> <td>gid</td> <td>游戏代号</td> <td>是</td> <td>String</td> <td>gid(小写),同运营核对</td> </tr> <tr> <td>uid</td> <td>玩家游戏账号</td> <td>是</td> <td>String</td> <td>同登陆接口参数uid</td> </tr> <tr> <td>time</td> <td>时间戳</td> <td>是</td> <td>int</td> <td>单位s,有效期为5分钟。</td> </tr> <tr> <td>sign</td> <td>签名</td> <td>是</td> <td>String</td> <td>md5(gid+uid+time+token)小写,token向运营申请</td> </tr> </tbody> </table> <h4>返回参数示例:</h4> <pre><code>{ &amp;quot;errno&amp;quot;: 0, &amp;quot;data&amp;quot;: { &amp;quot;vip&amp;quot;: 5, &amp;quot;plus&amp;quot;: 2, &amp;quot;bindPhone&amp;quot;: 1, &amp;quot;fcm&amp;quot;: 1 }, &amp;quot;msg&amp;quot;: &amp;quot;请求成功&amp;quot; } # bindPhone =&amp;gt; //0表示未绑定, 1表示绑定 # fcm =&amp;gt; //0 表示未通过防沉迷验证,1表示通过 </code></pre> <h4>返回参数说明:</h4> <table> <thead> <tr> <th>参数</th> <th>说明</th> <th>备注</th> </tr> </thead> <tbody> <tr> <td>errno</td> <td>结果状态码</td> <td>0 成功302 参数错误304 签名错误305 链接失效,超时</td> </tr> <tr> <td>msg</td> <td>结果信息</td> <td>一般为出错信息</td> </tr> <tr> <td>data</td> <td>结果数据集</td> <td></td> </tr> <tr> <td>data.vip</td> <td>vip等级</td> <td>0-9</td> </tr> <tr> <td>data.plus</td> <td>超玩会等级</td> <td>0,11-14</td> </tr> </tbody> </table> <h1>扫码充值流程【固定金额】</h1> <h4>接口说明</h4> <ul> <li>适用于游戏内固定金额,需游戏方先创建订单,通过订单ID请求扫码支付</li> </ul> <h4>请求方式:</h4> <ul> <li><code>GET</code></li> </ul> <h4>请求地址:</h4> <ul> <li><code>http://wan.ludashi.com/client/pay/geth5pay</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>game_id</td> <td>游戏id</td> </tr> <tr> <td>server_num</td> <td>区服编号</td> </tr> <tr> <td>uid</td> <td>当前用户ID</td> </tr> <tr> <td>money</td> <td>充值金额,单位:人民币元</td> </tr> <tr> <td>ret_params</td> <td>保持唯一性,标记游戏方的订单ID,充值成功后使用此参数发货</td> </tr> <tr> <td>user_ip</td> <td>用户真实ip地址</td> </tr> <tr> <td>extra</td> <td>透传参数</td> </tr> </tbody> </table> <h4>返回参数示例:</h4> <pre><code>{ &amp;quot;errno&amp;quot;: 0, &amp;quot;msg&amp;quot;: &amp;quot;success&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;sign&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;token&amp;quot;: &amp;quot;97dafa323561f5a88e3d182211d2bf13&amp;quot;, &amp;quot;scanUrl&amp;quot;: &amp;quot;http://wan.ludashi.com/client/pay/scan?sign=6280ed3d626bbda9235afd53b5af1997&amp;quot; } } # 使用返回参数中的scanUrl渲染图片二维码供用户扫码充值</code></pre> <h4>充值成功发货:</h4> <ul> <li>游戏方需要提供: 发货地址 &amp; 发货key</li> <li>请求地址:{接口地址}?uid=2927&amp;money=10&amp;ret_params=游戏方Order标识&amp;status=success&amp;extra=&amp;sign=sign</li> <li>详细参数</li> </ul> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>接口地址</td> <td>string</td> <td>必须</td> <td>游戏方提供,支持get</td> </tr> <tr> <td>uid</td> <td>string</td> <td>必须</td> <td>用户id</td> </tr> <tr> <td>money</td> <td>string</td> <td>必须</td> <td>充值金额</td> </tr> <tr> <td>ret_params</td> <td>string</td> <td>必须</td> <td>ret_params 游戏方订单标识</td> </tr> <tr> <td>status</td> <td>string</td> <td>必须</td> <td>success 标识订单在平台支付成功</td> </tr> <tr> <td>extra</td> <td>string</td> <td>必须</td> <td>透传参数</td> </tr> <tr> <td>sign</td> <td>string</td> <td>必须</td> <td>md5(uid+money+ret_params+key) 转小写, key双方约定</td> </tr> </tbody> </table> <ul> <li>发货游戏方返回: <pre><code>{ &amp;quot;state&amp;quot;: 1, // 成功 &amp;quot;msg&amp;quot;: &amp;quot;充值成功&amp;quot; }</code></pre></li> </ul> <h1>扫码充值流程【自定义金额】</h1> <h4>接口说明</h4> <ul> <li>游戏内点击【充值】后展示二维码,扫码后,在手机上选择支付金额</li> </ul> <h4>请求URL:</h4> <ul> <li><code>http://wan.ludashi.com/client/payAny/geth5pay</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th style="text-align: left;">参数</th> <th style="text-align: left;">说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">game_id</td> <td style="text-align: left;">游戏id</td> </tr> <tr> <td style="text-align: left;">server_num</td> <td style="text-align: left;">区服编号</td> </tr> <tr> <td style="text-align: left;">uid</td> <td style="text-align: left;">当前用户ID</td> </tr> <tr> <td style="text-align: left;">daifu_user</td> <td style="text-align: left;">当前用户ID</td> </tr> <tr> <td style="text-align: left;">format</td> <td style="text-align: left;">返回类型,json,image</td> </tr> </tbody> </table> <h4>返回值示例:</h4> <h5>JSON返回值格式:</h5> <pre><code>{ &amp;quot;errno&amp;quot;: 0, &amp;quot;msg&amp;quot;: &amp;quot;success&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;sign&amp;quot;: &amp;quot;84457fe11037d2ee166c382d9cf7e478&amp;quot; } }</code></pre> <h5>备注</h5> <ul> <li>errno =&gt; 0表示成功,其他值表示异常</li> <li>从接口获取到sign字段后, 使用以下URL渲染二维码</li> <li><code>http://wan.ludashi.com/client/payAny/index?sign={sign}</code></li> </ul> <h5>image返回值格式:</h5> <pre><code>{ &amp;quot;errno&amp;quot;: 0, &amp;quot;msg&amp;quot;: &amp;quot;success&amp;quot;, &amp;quot;data&amp;quot;: &amp;quot;图片数据流可以直接用在img标签的src属性上&amp;quot; } </code></pre> <h5>备注</h5> <ul> <li>errno =&gt; 0表示成功,其他值表示异常</li> <li>从接口拿到data后可直接用于img标签的src属性</li> </ul> <h1>充值回调</h1> <h4>接口说明:</h4> <ul> <li>玩家在平台充值成功后,由平台通过该充值接口向游戏发起发放游戏币的请求,在接口参数通过验证后,游戏向该服该玩家发放游戏币,并将元宝发放结果在接口中返回。</li> </ul> <h4>请求方式:</h4> <ul> <li><code>GET</code></li> </ul> <h4>请求地址示例:</h4> <ul> <li><code>http://{$host}/{$api}?platform=ludashi&amp;amp;orderId=1&amp;amp;gid=testhdx&amp;amp;sid=1&amp;amp;uid=2927&amp;amp;money=1&amp;amp;coin=10&amp;amp;time=1603334703&amp;amp;sign=000faa216b879a6c8b3331d8b9eb84b7</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>是否必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td><a href="http://{$host}/{$api">http://{$host}/{$api</a>}</td> <td></td> <td></td> <td>充值接口地址。接口地址中如果有区服变量,区服ID用字符串{$sid}代替</td> </tr> <tr> <td>platform</td> <td>String</td> <td>必须</td> <td>固定传ludashi, 标识平台</td> </tr> <tr> <td>orderId</td> <td>string</td> <td>必须</td> <td>订单号,不允许重复支持 字母、数字、下划线</td> </tr> <tr> <td>gid</td> <td>string</td> <td>必须</td> <td>游戏ID;如《神王》传 wzzx</td> </tr> <tr> <td>sid</td> <td>int</td> <td>必须</td> <td>所属服务器,一区填写1,二区填写2,依此类推</td> </tr> <tr> <td>uid</td> <td>String</td> <td>必须</td> <td>平台用户标识</td> </tr> <tr> <td>money</td> <td>float</td> <td>必须</td> <td>充值金额 单位元,支持两位小数</td> </tr> <tr> <td>coin</td> <td>int</td> <td>必须</td> <td>充值平台币数量</td> </tr> <tr> <td>time</td> <td>int</td> <td>必须</td> <td>平台服务器的时间戳(为长整数,单位秒)</td> </tr> <tr> <td>sign</td> <td>string</td> <td>必须</td> <td>md5(platform+orderId+gid+sid+uid+ money+coin+time+key)这里传递的md5字串为小写字母, 这里的key是表示平台和游戏双方提前协商约定好的密钥</td> </tr> </tbody> </table> <h4>返回参数示例:</h4> <pre><code>{ &amp;quot;errno&amp;quot;: 0, &amp;quot;data&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;msg&amp;quot;: &amp;quot;提示&amp;quot; }</code></pre> <h4>返回参数说明:</h4> <table> <thead> <tr> <th>errno</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>成功</td> </tr> <tr> <td>1</td> <td>订单号已存在(充值已成功)</td> </tr> <tr> <td>-2</td> <td>用户不存在</td> </tr> <tr> <td>-3</td> <td>IP限制</td> </tr> <tr> <td>-4</td> <td>md5校验错误</td> </tr> <tr> <td>-5</td> <td>time时间已过期 时间差在 前后3分钟内</td> </tr> <tr> <td>-6</td> <td>游戏服务器繁忙</td> </tr> <tr> <td>-7</td> <td>参数错误</td> </tr> </tbody> </table> <h4>充值接口其他要求:</h4> <ul> <li>错误帐号不能充值,也就是不存在角色的账号。</li> <li>同个订单号前面出错 要能补单。比如突然网络异常或者玩家输入错账号,充值接口返回充值失败。等接口正常后, 我们客服需要对这些失败的充值订单补单。</li> </ul> <h1>玩家上下线日志</h1> <h4>接口说明:</h4> <ul> <li>为了运营以及防沉迷的需求,游戏方调用此接口,通知平台记录玩家上下线日志。</li> </ul> <h4>请求方式:</h4> <ul> <li><code>POST</code></li> </ul> <h4>请求地址:</h4> <ul> <li><code>http://wan.ludashi.com/client/report/userLogInout</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>gid</td> <td>String</td> <td>必须</td> <td>约定的游戏ID</td> </tr> <tr> <td>time</td> <td>string</td> <td>必须</td> <td>请求的时间戳</td> </tr> <tr> <td>sign</td> <td>String</td> <td>必须</td> <td>md5(gid+time+key) 转小写,+为连接符,key双方运营约定,一般为登陆游戏key</td> </tr> <tr> <td>玩家详细日志以文本的格式POST</td> <td>String(Json)</td> <td>必须</td> <td>多维数组,一条记录传一条数组,每次传输数据不超过2000条。例如:Json_encode([ ['uid'=&gt;'93', 'sid'=&gt;1, 'role'=&gt;'好汉', 'ip'=&gt;'127.0.0.1', 'type'=&gt;1, 'device'=&gt;’pc’, 'time'=&gt;1616984624 ], ['uid'=&gt;'2927', 'sid'=&gt;2, 'role'=&gt;'靓仔', 'ip'=&gt;'127.0.0.1', 'type'=&gt;2,'device'=&gt;’ios’, 'time'=&gt;1616984624 ], ])详细参数解释:uid: 平台登陆游戏的唯一标识sid: 登陆的区服role: 角色名ip: 登陆地址type: 类型 1:登陆2:退出device: 设备类型 pc</td> <td>android</td> <td>iostime: 玩家发生行为时的准确时间,时间戳</td> </tr> </tbody> </table> <h4>返回参数示例:</h4> <pre><code>{ &amp;quot;errno&amp;quot;: 1, &amp;quot;data&amp;quot;: [], &amp;quot;msg&amp;quot;: &amp;quot;数据过多&amp;quot; } # errno=0时,表示请求成功</code></pre> <h4>参考代码:</h4> <pre><code># php版本 function testUserLogInOut() { $testData = [ ['uid'=&amp;gt;'93', 'sid'=&amp;gt;1, 'role'=&amp;gt;'好汉', 'ip'=&amp;gt;'127.0.0.1', 'type'=&amp;gt;1, 'device'=&amp;gt;'ios','time'=&amp;gt;1616984624 ], ['uid'=&amp;gt;'2927', 'sid'=&amp;gt;2, 'role'=&amp;gt;'靓仔', 'ip'=&amp;gt;'127.0.0.1', 'type'=&amp;gt;2, 'device'=&amp;gt;'pc','time'=&amp;gt;1616984624 ] ]; $key = '运营约定,一般为登录游戏key'; $param = [ 'gid' =&amp;gt; '游戏ID', 'time' =&amp;gt; time(), ]; $param['sign'] = md5(implode('', $param) . $key); $url = &amp;quot;http://wan.ludashi.com/client/report/userLogInout?&amp;quot;.http_build_query($param); $options = [ CURLOPT_URL =&amp;gt; $url, CURLOPT_RETURNTRANSFER =&amp;gt; true, CURLOPT_HEADER =&amp;gt; false, CURLOPT_POST =&amp;gt; true, CURLOPT_HTTPHEADER =&amp;gt; ['Content-Type: text/plain'], CURLOPT_POSTFIELDS =&amp;gt; json_encode($testData), ]; $ch = curl_init(); curl_setopt_array($ch, $options); $resp = curl_exec($ch); curl_close($ch); echo ($resp); }</code></pre> <h1>九、游戏内实名认证接口</h1> <h4>接口说明:</h4> <ul> <li>选择接入,游戏内弹出实名认证框,简化实名认证流程。</li> </ul> <h4>请求方式:</h4> <ul> <li><code>POST | GET</code></li> </ul> <h4>请求地址示例:</h4> <ul> <li><code>https://wan.ludashi.com/openApi/realAuth?uid=3233&amp;amp;idcard=510104199003077014&amp;amp;truename=%E5%BC%A0%E4%B8%89&amp;amp;type=yeyou&amp;amp;gid=ltzn&amp;amp;time=1625044377&amp;amp;sign=fc2d7bb9e7383696d2ab57f17fbb0be2</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>uid</td> <td>string</td> <td>必须</td> <td>平台用户标识,登录游戏时传入游戏方的用户标识</td> </tr> <tr> <td>idcard</td> <td>String</td> <td>必须</td> <td>玩家真实身份证</td> </tr> <tr> <td>truename</td> <td>string</td> <td>必须</td> <td>玩家真实姓名</td> </tr> <tr> <td>type</td> <td>string</td> <td>必须</td> <td>yeyou 页游; h5 H5游戏; client 端游</td> </tr> <tr> <td>gid</td> <td>string</td> <td>必须</td> <td>游戏id,向运营人员获取</td> </tr> <tr> <td>time</td> <td>Int</td> <td>必须</td> <td>当前请求的时间戳</td> </tr> <tr> <td>sign</td> <td>String</td> <td>必须</td> <td>md5($uid.$type.$gid.$time.$key)md5字串为小写字母, key为登录游戏的key</td> </tr> </tbody> </table> <h4>返回参数示例:</h4> <pre><code>{ &amp;quot;errno&amp;quot;: 0, &amp;quot;msg&amp;quot;: &amp;quot;更新成功&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;age&amp;quot;: 23 } } # errno =&amp;gt; 0:成功,非0:失败</code></pre> <h1>十、根据token获取用户标识</h1> <h4>接口说明:</h4> <ul> <li>选择接入,游戏内弹出实名认证框,简化实名认证流程。</li> </ul> <h4>请求方式:</h4> <ul> <li><code>POST | GET</code></li> </ul> <h4>请求地址示例:</h4> <ul> <li><code>https://wan.ludashi.com/client/api/checkToken?gid=&amp;amp;token=</code></li> </ul> <h4>请求参数:</h4> <table> <thead> <tr> <th>参数</th> <th>类型</th> <th>必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>gid</td> <td>string</td> <td>必须</td> <td>游戏id,向运营人员获取</td> </tr> <tr> <td>token</td> <td>Int</td> <td>必须</td> <td>用户token</td> </tr> </tbody> </table> <h4>返回参数示例:</h4> <pre><code>{ &amp;quot;errno&amp;quot;: 0, &amp;quot;msg&amp;quot;: &amp;quot;success&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;uid&amp;quot;: 1,//用户标识1 &amp;quot;fid&amp;quot;: 1//用户标识2 } } # errno =&amp;gt; 0:成功,非0:失败</code></pre>

页面列表

ITEM_HTML