{"id":18,"date":"2022-03-19T19:30:52","date_gmt":"2022-03-19T11:30:52","guid":{"rendered":"https:\/\/tech.rpt.cc\/?p=18"},"modified":"2022-05-28T14:13:11","modified_gmt":"2022-05-28T06:13:11","slug":"ce","status":"publish","type":"post","link":"https:\/\/tech.rpt.cc\/index.php\/2022\/03\/19\/ce\/","title":{"rendered":"\u4e8c\u3001\u7528\u6237\u767b\u5f55\u63a5\u53e3"},"content":{"rendered":"\n<ul><li><strong>\u63a5\u53e3\u8bf4\u660e\uff1a<\/strong>&nbsp;\u7528\u6237\u767b\u5f55\u63a5\u53e3<\/li><li><strong>\u63a5\u53e3\u5730\u5740\uff1a<\/strong>&nbsp;\/api\/uc\/login<\/li><li><strong>\u8bf7\u6c42\u65b9\u5f0f\uff1a<\/strong>&nbsp;POST<\/li><\/ul>\n\n\n\n<h4 id=\"\u8bf7\u6c42\u53c2\u6570\"><a href=\"https:\/\/discuz.com\/api-docs\/v1\/UcenterLogin.html#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0\" target=\"_blank\"  rel=\"nofollow\" >#<\/a>\u8bf7\u6c42\u53c2\u6570<\/h4>\n\n\n\n<figure class=\"gc-block-table\"><table><thead><tr><th>\u53c2\u6570\u540d\u79f0<\/th><th>\u7c7b\u578b<\/th><th>\u662f\u5426\u987b<\/th><th>\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td>username<\/td><td>varchar<\/td><td>\u662f<\/td><td>\u7528\u6237\u540d<\/td><\/tr><tr><td>password<\/td><td>varchar<\/td><td>\u662f<\/td><td>\u5bc6\u7801<\/td><\/tr><tr><td>questionid<\/td><td>varchar<\/td><td>\u5426<\/td><td>\u95ee\u9898<\/td><\/tr><tr><td>answer<\/td><td>varchar<\/td><td>\u5426<\/td><td>\u7b54\u6848<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 id=\"\u8bf7\u6c42\u793a\u4f8b\"><a href=\"https:\/\/discuz.com\/api-docs\/v1\/UcenterLogin.html#%E8%AF%B7%E6%B1%82%E7%A4%BA%E4%BE%8B\" target=\"_blank\"  rel=\"nofollow\" >#<\/a>\u8bf7\u6c42\u793a\u4f8b<\/h4>\n\n\n\n<pre class=\"gc-block-code\"><code>{\n  \"data\": {\n    \"attributes\": {\n      \"username\": \"username\",\n      \"password\": \"password\",\n      \"questionid\": \"\",\n      \"answer\": \"\"\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<h4 id=\"\u8fd4\u56de\u7ed3\u679c\">\u8fd4\u56de\u7ed3\u679c<\/h4>\n\n\n\n<figure class=\"gc-block-table\"><table><thead><tr><th>\u53c2\u6570\u540d\u79f0<\/th><th>\u7c7b\u578b<\/th><th>\u51fa\u73b0\u8981\u6c42<\/th><th>\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td>token_type<\/td><td>string<\/td><td>\u767b\u5f55\u6210\u529f<\/td><td>token \u7c7b\u578b<\/td><\/tr><tr><td>expires_in<\/td><td>int<\/td><td>\u767b\u5f55\u6210\u529f<\/td><td>\u65f6\u95f4<\/td><\/tr><tr><td>access_token<\/td><td>token<\/td><td>\u767b\u5f55\u6210\u529f<\/td><td>\u7528\u6237\u6807\u8bc6<\/td><\/tr><tr><td>refresh_token<\/td><td>token<\/td><td>\u767b\u5f55\u6210\u529f<\/td><td>\u5237\u65b0\u7528\u6237\u6807\u8bc6<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 id=\"\u8fd4\u56de\u8bf4\u660e\"><a href=\"https:\/\/discuz.com\/api-docs\/v1\/UcenterLogin.html#%E8%BF%94%E5%9B%9E%E8%AF%B4%E6%98%8E\" target=\"_blank\"  rel=\"nofollow\" >#<\/a>\u8fd4\u56de\u8bf4\u660e<\/h4>\n\n\n\n<ul><li>\u767b\u5f55\u6210\u529f\uff0c http \u72b6\u6001\u7801\uff1a 200<\/li><li>\u767b\u5f55\u5931\u8d25\uff0c http \u72b6\u6001\u7801\uff1a 500<\/li><\/ul>\n\n\n\n<h4 id=\"\u8fd4\u56de\u793a\u4f8b\"><a href=\"https:\/\/discuz.com\/api-docs\/v1\/UcenterLogin.html#%E8%BF%94%E5%9B%9E%E7%A4%BA%E4%BE%8B\" target=\"_blank\"  rel=\"nofollow\" >#<\/a>\u8fd4\u56de\u793a\u4f8b<\/h4>\n\n\n\n<pre class=\"gc-block-code\"><code>{\n  \"data\": {\n    \"type\": \"token\",\n    \"id\": \"1\",\n    \"attributes\": {\n      \"token_type\": \"Bearer\",\n      \"expires_in\": 2592000,\n      \"access_token\": \"eyJ0eXAiOiJKV1Qi......dj3H9CCSPib6MQtnaT6VNrw\",\n      \"refresh_token\": \"def50200a26b6a9......10ccbf3c1694084c2d2d276\"\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<h4><a href=\"https:\/\/discuz.com\/api-docs\/v1\/UcenterLogin.html#%E8%BF%94%E5%9B%9E%E7%A4%BA%E4%BE%8B\" target=\"_blank\"  rel=\"nofollow\" >#<\/a>\u8fd4\u56de\u5931\u8d25<\/h4>\n\n\n\n<pre class=\"gc-block-code\"><code>{\n  \"error\": \"invalid_grant\",\n  \"error_description\": \"The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.\",\n  \"hint\": \"\",\n  \"message\": \"The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.\"\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u63a5\u53e3\u8bf4\u660e\uff1a&nbsp;\u7528\u6237\u767b\u5f55\u63a5\u53e3 \u63a5\u53e3\u5730\u5740\uff1a&nbsp;\/api\/uc\/login \u8bf7\u6c42\u65b9\u5f0f\uff1a&nbsp;P [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/posts\/18"}],"collection":[{"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/posts"}],"about":[{"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/comments?post=18"}],"version-history":[{"count":12,"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/posts\/18\/revisions\/159"}],"gc:attachment":[{"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/media?parent=18"}],"gc:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.rpt.cc\/index.php\/gc-json\/gc\/v2\/tags?post=18"}],"curies":[{"name":"gc","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}