{"id":1424,"date":"2025-05-20T10:55:59","date_gmt":"2025-05-20T02:55:59","guid":{"rendered":"https:\/\/open-doc.jkos.com\/?post_type=docs&#038;p=1424"},"modified":"2025-05-20T10:55:59","modified_gmt":"2025-05-20T02:55:59","slug":"%e9%96%8b%e6%94%be%e5%b9%b3%e5%8f%b0%e7%b0%a1%e4%bb%8b","status":"publish","type":"docs","link":"https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/oauth\/%e9%96%8b%e6%94%be%e5%b9%b3%e5%8f%b0%e7%b0%a1%e4%bb%8b","title":{"rendered":"\u958b\u653e\u5e73\u53f0\u7c21\u4ecb"},"content":{"rendered":"<div class=\"ub_table-of-contents\" data-showtext=\"show\" data-hidetext=\"hide\" data-scrolltype=\"auto\" id=\"ub_table-of-contents-1678e027-5268-4acc-8048-3978ed4c046e\" data-initiallyhideonmobile=\"false\"\n                    data-initiallyshow=\"true\"><div class=\"ub_table-of-contents-extra-container\"><div class=\"ub_table-of-contents-container ub_table-of-contents-1-column \"><ul><li><a href=https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/oauth\/%e9%96%8b%e6%94%be%e5%b9%b3%e5%8f%b0%e7%b0%a1%e4%bb%8b#0-%E8%A1%97%E5%8F%A3%E9%96%8B%E6%94%BE%E5%B9%B3%E5%8F%B0-jop>\u8857\u53e3\u958b\u653e\u5e73\u53f0 (JOP)<\/a><\/li><li><a href=https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/oauth\/%e9%96%8b%e6%94%be%e5%b9%b3%e5%8f%b0%e7%b0%a1%e4%bb%8b#1-method-%E8%88%87-scope>Method \u8207 Scope<\/a><ul><li><a href=https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/oauth\/%e9%96%8b%e6%94%be%e5%b9%b3%e5%8f%b0%e7%b0%a1%e4%bb%8b#2-method>Method<\/a><\/li><li><a href=https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/oauth\/%e9%96%8b%e6%94%be%e5%b9%b3%e5%8f%b0%e7%b0%a1%e4%bb%8b#3-scope>Scope<\/a><\/li><\/ul><\/li><li><a href=https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/oauth\/%e9%96%8b%e6%94%be%e5%b9%b3%e5%8f%b0%e7%b0%a1%e4%bb%8b#4-%E6%93%8D%E4%BD%9C%E6%B5%81%E7%A8%8B>\u64cd\u4f5c\u6d41\u7a0b<\/a><\/li><\/ul><\/div><\/div><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"0-%E8%A1%97%E5%8F%A3%E9%96%8B%E6%94%BE%E5%B9%B3%E5%8F%B0-jop\">\u8857\u53e3\u958b\u653e\u5e73\u53f0 (JOP)<\/h2>\n\n\n\n<p>\u5728\u8857\u53e3 App \u5167\u4f7f\u7528\u8857\u53e3\u5e33\u865f\u767b\u5165 Web \u7684\u6d41\u7a0b\u662f\u4ee5 OAuth 2.0 \u6388\u6b0a\u78bc\u6838\u767c\u6d41\u7a0b\uff08Authorization Code Grant Flow\uff09\u70ba\u57fa\u790e\u3002\u958b\u767c\u8005\u7684\u61c9\u7528\u5fc5\u9808\u80fd\u767c\u51fa server-side request\uff0c\u4e26\u63a5\u6536\u4f86\u81ea\u8857\u53e3\u4f3a\u670d\u5668\u7aef\u7684\u8cc7\u6599\u3002<\/p>\n\n\n\n<p>\u8857\u53e3\u958b\u653e\u5e73\u53f0\u63d0\u4f9b\u5404 ISV \u696d\u8005\u8a2a\u554f\u8857\u53e3\u670d\u52d9\uff0cISV \u696d\u8005\u4f7f\u7528\u8857\u53e3\u958b\u653e\u5e73\u53f0\u524d\uff0c\u9700\u5148\u53d6\u5f97 Credential (client_id) \u4ee5\u53ca\u5c0d\u61c9\u7684\u5bc6\u9470 (secret_key)\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1-method-%E8%88%87-scope\">Method \u8207 Scope<\/h2>\n\n\n\n<p>\u8857\u53e3\u958b\u653e\u5e73\u53f0\u5c07\u4ee5 scope \u505a\u70ba\u8857\u53e3\u4f7f\u7528\u8005\u6388\u6b0a ISV \u696d\u8005\u7684\u6b0a\u9650\u63a7\u7ba1\uff0c\u4e0b\u9762\u5217\u8868\u70ba\u5404\u500b scope \u5c0d\u61c9\u4f7f\u7528\u7684 API\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-method\">Method<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>Method<\/strong><\/th><th><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td>jkopay.system.oauth.token<\/td><td>\u53d6\u5f97\u8a2a\u554f\u4ee4\u724c\uff0c\u4ee5\u4fbf\u5f8c\u7e8c\u547c\u53eb API<\/td><\/tr><tr><td>jkopay.user.profile<\/td><td>\u53d6\u5f97\u8857\u53e3\u7528\u6236\u6388\u6b0a\u4e4b\u8cc7\u6599<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-scope\">Scope<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Scope<\/th><th>API<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>jkosAccount<\/td><td>jkopay.user.profile<\/td><td>\u8857\u53e3\u5e33\u6236<\/td><\/tr><tr><td>gender<\/td><td>jkopay.user.profile<\/td><td>\u6027\u5225<\/td><\/tr><tr><td>phone<\/td><td>jkopay.user.profile<\/td><td>\u96fb\u8a71\u865f\u78bc<\/td><\/tr><tr><td>email<\/td><td>jkopay.user.profile<\/td><td>Email<\/td><\/tr><tr><td>birthday<\/td><td>jkopay.user.profile<\/td><td>\u51fa\u751f\u65e5\u671f<\/td><\/tr><tr><td>name<\/td><td>jkopay.user.profile<\/td><td>\u59d3\u540d<\/td><\/tr><tr><td>barcode<\/td><td>jkopay.user.profile<\/td><td>\u624b\u6a5f\u8f09\u5177\u689d\u78bc<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4-%E6%93%8D%E4%BD%9C%E6%B5%81%E7%A8%8B\">\u64cd\u4f5c\u6d41\u7a0b<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u70ba OAuth \u9a57\u8b49\u6240\u9700\u6d41\u7a0b\uff0c\u65bc\u7372\u53d6 access_token \u5f8c\uff0c\u958b\u767c\u8005\u7684\u61c9\u7528\u5c07\u53ef\u4ee5\u900f\u904e\u8a72 access_token \u8a2a\u554f\u7528\u6236\u6388\u6b0a\u5728\u8857\u53e3\u958b\u653e\u5e73\u53f0\u7684\u64cd\u4f5c\u3002\u958b\u767c\u8005\u7684\u61c9\u7528\u4f7f\u7528\u8857\u53e3\u958b\u653e\u5e73\u53f0\u6642\uff0c\u9808\u9075\u5b88\u76f8\u95dc\u898f\u5b9a\u3002\u4e0b\u9762\u7bc4\u4f8b\u5c07\u8aaa\u660e\u5982\u4f55\u5728\u8857\u53e3\u7528\u6236\u6388\u6b0a\u5f8c\u7372\u53d6\u7528\u6236\u65bc\u8857\u53e3\u7684\u500b\u4eba\u8cc7\u6599\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"578\" src=\"https:\/\/open-doc.jkos.com\/wp-content\/uploads\/2025\/05\/\u622a\u5716-2025-05-19-\u4e0b\u53486.37.54-1024x578.png\" alt=\"\" class=\"wp-image-1432\" srcset=\"https:\/\/open-doc.jkos.com\/wp-content\/uploads\/2025\/05\/\u622a\u5716-2025-05-19-\u4e0b\u53486.37.54-1024x578.png 1024w, https:\/\/open-doc.jkos.com\/wp-content\/uploads\/2025\/05\/\u622a\u5716-2025-05-19-\u4e0b\u53486.37.54-300x169.png 300w, https:\/\/open-doc.jkos.com\/wp-content\/uploads\/2025\/05\/\u622a\u5716-2025-05-19-\u4e0b\u53486.37.54-768x434.png 768w, https:\/\/open-doc.jkos.com\/wp-content\/uploads\/2025\/05\/\u622a\u5716-2025-05-19-\u4e0b\u53486.37.54.png 1502w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u53d6\u5f97 Auth Code (1~4)<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u958b\u767c\u8005\u7db2\u9801\u901a\u904e\u8857\u53e3\u63d0\u4f9b Library (.umd.js) \u547c\u53eb JSAPI jkos.getAuthCode()\uff0c\u65bc\u9700\u8981\u53d6\u5f97\u6388\u6b0a\u7684\u9801\u9762\u555f\u52d5\u6388\u6b0a\u540c\u610f\u9801\u3002API \u898f\u683c\u8acb\u53c3\u8003\u7db2\u9801\u6587\u4ef6\uff1a<a href=\"https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/web-sdk\/sdk-%e7%92%b0%e5%a2%83%e7%89%88%e6%9c%ac\" data-type=\"link\" data-id=\"https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/web-sdk\/sdk-%e7%92%b0%e5%a2%83%e7%89%88%e6%9c%ac\">Web SDK \u74b0\u5883\u7248\u672c<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u63db\u53d6 Access Token (6~7)<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u6210\u529f\u65bc\u7b2c\u4e00\u6b65\u7372\u53d6 auth_code \u5f8c\uff0c\u958b\u767c\u8005\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u670d\u52d9\u7aef\u900f\u904e API jkopay.system.oauth.token \u4f7f\u7528 auth_code \u63db\u53d6 access_token \u3002auth_code \u4f5c\u70ba\u63db\u53d6 access_token \u7684\u6191\u8b49\uff0c\u6bcf\u6b21\u4f7f\u7528\u8005\u6388\u6b0a\u5b8c\u6210\u5f8c\uff0c\u5176\u8fd4\u56de\u53c3\u6578\u4e2d\u7684 auth_code \u5c07\u90fd\u4e0d\u4e00\u6a23\uff0c auth_code \u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\uff0c\u6709\u6548\u671f\u70ba 24 \u5c0f\u6642\uff0c\u6388\u6b0a\u5f8c\u7684 24 \u5c0f\u6642\u5167\u672a\u88ab\u4f7f\u7528\u5c07\u81ea\u52d5\u904e\u671f\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"featured_media":0,"parent":1381,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-1424","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1424"}],"version-history":[{"count":27,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1424\/revisions"}],"predecessor-version":[{"id":1459,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1424\/revisions\/1459"}],"up":[{"embeddable":true,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1381"}],"next":[{"title":"JOP Gateway","link":"https:\/\/open-doc.jkos.com\/?docs=inapp-%e7%ac%ac%e4%b8%89%e6%96%b9%e6%9c%8d%e5%8b%99\/oauth\/jop-gateway","href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=\/wp\/v2\/docs\/1450"}],"wp:attachment":[{"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1424"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/open-doc.jkos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=1424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}