阅达馆藏API

阅达馆藏API


微信用户登录-code换取session_key的API

<h1>开发者</h1> <ul> <li>罗恒山</li> </ul> <h1>说明</h1> <ul> <li>微信用户登录-code换取session_key</li> </ul> <h1>请求</h1> <ul> <li>Endpoint: <code>/api/auth/wx_verify</code></li> <li>Method:POST</li> </ul> <h1>请求参数</h1> <h2>POST 参数</h2> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">code</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>微信返回的code</td> </tr> </tbody> </table> <h1>返回值说明</h1> <h2>1、成功返回</h2> <pre><code>{ &amp;quot;status_code&amp;quot;: 200, &amp;quot;message&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;openid&amp;quot;: &amp;quot;xxxxxxx&amp;quot;, &amp;quot;session_key&amp;quot;: &amp;quot;xxxxxxx&amp;quot; } }</code></pre> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">openid</td> <td style="text-align: left;">string</td> <td>openid</td> </tr> <tr> <td style="text-align: left;">session_key</td> <td style="text-align: left;">string</td> <td>session_key</td> </tr> </tbody> </table> <h2>2、配置錯誤</h2> <pre><code>{ &amp;quot;status_code&amp;quot;: 500, &amp;quot;message&amp;quot;: &amp;quot;配置錯誤&amp;quot;, &amp;quot;errors&amp;quot;: [] }</code></pre> <h2>3、code已过期或不正确</h2> <pre><code>{ &amp;quot;status_code&amp;quot;: 401, &amp;quot;message&amp;quot;: &amp;quot;code已过期或不正确&amp;quot;, &amp;quot;errors&amp;quot;: [] }</code></pre> <h1>备注</h1> <ul> <li>更多返回错误代码请看首页的错误代码描述</li> </ul>

页面列表

ITEM_HTML