{"id":10840,"date":"2022-11-17T17:10:10","date_gmt":"2022-11-17T09:10:10","guid":{"rendered":"https:\/\/www.yimenapp.com\/kb-yimen\/?p=10840"},"modified":"2022-11-17T17:10:10","modified_gmt":"2022-11-17T09:10:10","slug":"oppo%e5%bc%80%e6%94%be%e5%b9%b3%e5%8f%b0api%e4%bc%a0%e5%8c%85%e8%83%bd%e5%8a%9b%e6%8e%a5%e5%85%a5-%e6%96%87%e4%bb%b6%e4%b8%8a%e4%bc%a0","status":"publish","type":"post","link":"https:\/\/www.yimenapp.com\/kb-yimen\/10840\/","title":{"rendered":"OPPO\u5f00\u653e\u5e73\u53f0API\u4f20\u5305\u80fd\u529b\u63a5\u5165 \u6587\u4ef6\u4e0a\u4f20"},"content":{"rendered":"\n<p>OPPO\u5f00\u653e\u5e73\u53f0API\u4f20\u5305\u80fd\u529b\u63a5\u5165 <strong style=\"font-family: OPPOSans-B; font-size: 2.5rem; white-space: normal; margin: 0px; padding: 0px; box-sizing: border-box; border: 0px;\">\u6587\u4ef6\u4e0a\u4f20<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"header-1\"><strong>\u4e0a\u4f20\u6d41\u7a0b\u8bf4\u660e<\/strong><\/h2>\n\n\n\n<p>1\uff09\u8bf7\u6c42&nbsp;<strong>\u83b7\u53d6\u4e0a\u4f20\u914d\u7f6e<\/strong>&nbsp;\u63a5\u53e3\u5b9e\u65f6\u83b7\u53d6\u4e0a\u4f20\u7684\u8bf7\u6c42 URL \u548c sign\u3002<\/p>\n\n\n\n<p>2\uff09\u8bf7\u6c42 <span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/upload\/\" title=\"upload\" target=\"_blank\">upload<\/a><\/span>_<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/url\/\" title=\"url\" target=\"_blank\">url<\/a><\/span>\uff0c\u53c2\u6570\u4e3a&nbsp;<strong>\u6587\u4ef6\u4e0a\u4f20<\/strong>&nbsp;\u63a5\u53e3\u5217\u51fa\u7684\u53c2\u6570\uff0csign \u662f\u4e00\u6b21\u6027\u7684\uff0c\u6bcf\u4e0a\u4f20\u4e00\u4e2a\u6587\u4ef6\u90fd\u9700\u8981\u91cd\u65b0\u83b7\u53d6\u4e00\u6b21\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"header-2\"><a><\/a><strong>\u83b7\u53d6\u4e0a\u4f20\u914d\u7f6e<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-3\"><a><\/a><strong>\u63a5\u53e3\u529f\u80fd<\/strong><\/h3>\n\n\n\n<p>\u6b64\u63a5\u53e3\u7528\u4e8e\u83b7\u53d6\u4e0a\u4f20\u6587\u4ef6\u914d\u7f6e\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-4\"><a><\/a><strong>\u63a5\u53e3\u539f\u578b<\/strong><\/h3>\n\n\n\n<p>-\u8bf7\u6c42\u8def\u7531\uff1a\/resource\/v1\/upload\/get-upload-url<br>-\u8bf7\u6c42\u65b9\u6cd5\uff1a<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/get\/\" title=\"GET\" target=\"_blank\">GET<\/a><\/span><br>-\u8bf7\u6c42\u7c7b\u578b\uff1a<code>Content-Type: x-www-form-urlencoded<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-5\"><a><\/a><strong>\u8bf7\u6c42\u53c2\u6570<\/strong><\/h3>\n\n\n\n<p>\u53ea\u9700\u4f20\u5165\u516c\u5171\u53c2\u6570\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-6\"><a><\/a><strong>\u8bf7\u6c42\u54cd\u5e94<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"header-7\"><a><\/a><strong>\u54cd\u5e94\u8bf4\u660e<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5b57\u6bb5<\/th><th>\u7c7b\u578b<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>errno<\/td><td>int<\/td><td>\u9519\u8bef\u7801\uff0c\u4e3a 0 \u8868\u793a\u8bf7\u6c42\u6210\u529f<\/td><\/tr><tr><td>data<\/td><td>PreUploadBody<\/td><td>\u54cd\u5e94\u7ed3\u679c\uff0c\u7ed3\u6784\u53c2\u8003 PreUploadBody<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-8\"><a><\/a><strong>PreUploadBody<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5b57\u6bb5<\/th><th>\u7c7b\u578b<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>upload_url<\/td><td>string<\/td><td>\u6587\u4ef6\u4e0a\u4f20 URL<\/td><\/tr><tr><td>sign<\/td><td>string<\/td><td>\u4e00\u6b21\u6027\u6807\u8bc6\uff0c\u5355\u6b21\u6709\u6548\uff0c\u6bcf\u4e2a\u65b0\u6587\u4ef6\u5fc5\u987b\u91cd\u65b0\u83b7\u53d6<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-9\"><a><\/a><strong>\u54cd\u5e94\u793a\u4f8b<\/strong><\/h3>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"header-10\"><a><\/a><strong>\u6210\u529f\u793a\u4f8b<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"errno\": 0,\n    \"data\": {\n        \"upload_url\": \"https:\/\/oppo.com\/xxxxxxxxx\",\n        \"sign\": \"b1fe****ad13\"\n    }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"header-11\"><a><\/a><strong>\u6587\u4ef6\u4e0a\u4f20<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-12\"><a><\/a><strong>\u63a5\u53e3\u529f\u80fd<\/strong><\/h3>\n\n\n\n<p>\u6b64\u63a5\u53e3\u7528\u4e8e\u4e0a\u4f20\u6587\u4ef6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-13\"><a><\/a><strong>\u63a5\u53e3\u539f\u578b<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u8bf7\u6c42 URL\uff1a\u63a5\u53e3\u83b7\u53d6\u4e0a\u4f20\u914d\u7f6e\u8fd4\u56de\u7684&nbsp;<code>upload_url<\/code><\/li><li>\u8bf7\u6c42\u65b9\u6cd5\uff1aPOST<\/li><li>\u8bf7\u6c42\u7c7b\u578b\uff1a<code>Content-Type: multipart\/form-data<\/code><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-14\"><a><\/a><strong>\u8bf7\u6c42\u53c2\u6570<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5b57\u6bb5<\/th><th>\u7c7b\u578b<\/th><th>\u662f\u5426\u5fc5\u4f20<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>type<\/td><td>string<\/td><td>\u662f<\/td><td>\u6587\u4ef6\u7c7b\u578b\uff0c\u5305\u62ec\u7167\u7247\u3001APK \u5305\u3001\u5176\u5b83\uff0c\u503c\u662f\uff1aphoto\u3001apk\u3001resource<\/td><\/tr><tr><td>sign<\/td><td>string<\/td><td>\u662f<\/td><td>\u4e00\u6b21\u6027\u6807\u8bc6\uff0c\u4ece\u83b7\u53d6\u4e0a\u4f20\u914d\u7f6e\u8fd4\u56de\u7684 sign \u5b57\u6bb5\uff0c\u5355\u6b21\u6709\u6548\uff0c\u6bcf\u4e2a\u65b0\u6587\u4ef6\u5fc5\u987b\u91cd\u65b0\u83b7\u53d6<\/td><\/tr><tr><td>file<\/td><td>binary<\/td><td>\u662f<\/td><td>\u6587\u4ef6\u5bf9\u8c61<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-15\"><a><\/a><strong>\u8bf7\u6c42\u54cd\u5e94<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"header-16\"><a><\/a><strong>\u54cd\u5e94\u8bf4\u660e<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5b57\u6bb5<\/th><th>\u7c7b\u578b<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>errno<\/td><td>int<\/td><td>\u9519\u8bef\u7801\uff0c\u4e3a 0 \u8868\u793a\u8bf7\u6c42\u6210\u529f<\/td><\/tr><tr><td>data<\/td><td>map<\/td><td>\u54cd\u5e94\u7ed3\u679c\uff0c\u53c2\u8003 UploadObj<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-17\"><a><\/a><strong>UploadObj<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5b57\u6bb5<\/th><th>\u7c7b\u578b<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>url<\/td><td>string<\/td><td>\u6587\u4ef6\u5730\u5740\uff08\u5e26\u57df\u540d\uff09<\/td><\/tr><tr><td>uri_path<\/td><td>string<\/td><td>\u6587\u4ef6 URI\uff08\u4e0d\u5e26\u57df\u540d\uff09<\/td><\/tr><tr><td>md5<\/td><td>string<\/td><td>\u6587\u4ef6 MD5<\/td><\/tr><tr><td>file_extension<\/td><td>string<\/td><td>\u6587\u4ef6\u6269\u5c55\u540d<\/td><\/tr><tr><td>file_size<\/td><td>int<\/td><td>\u6587\u4ef6\u5927\u5c0f<\/td><\/tr><tr><td>id<\/td><td>string<\/td><td>\u6807\u8bb0<\/td><\/tr><tr><td>width<\/td><td>int<\/td><td>\u56fe\u7247\u5bbd\u5ea6\uff08\u53ea\u6709\u56fe\u7247\u624d\u6709\uff09<\/td><\/tr><tr><td>height<\/td><td>int<\/td><td>\u56fe\u7247\u9ad8\u5ea6\uff08\u53ea\u6709\u56fe\u7247\u624d\u6709\uff09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header-18\"><a><\/a><strong>\u54cd\u5e94\u793a\u4f8b<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"header-19\"><a><\/a><strong>\u6210\u529f\u793a\u4f8b<\/strong><\/h4>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"header-20\"><a><\/a><strong>APK \u7c7b\u578b<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"errno\": 0,\n    \"data\": {\n        \"url\": \"https:\/\/oppo.com\/********261d.apk\",\n        \"uri_path\": \"\/********261d.apk\",\n        \"md5\": \"5efd****4d4d\",\n        \"file_extension\": \"apk\",\n        \"file_size\": 4181241,\n        \"id\": \"XXXXX\"\n    }\n}\n<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"header-21\"><a><\/a><strong>\u56fe\u7247\u7c7b\u578b<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code> {\n     \"errno\": 0,\n     \"data\": {\n         \"url\": \"http:\/\/oppo.com\/********d47d.jpg\",\n         \"uri_path\": \"\/********d47d.jpg\",\n         \"md5\": \"55e3****1084\",\n         \"sign\": \"eee4****bce4\",\n         \"width\": 1080,\n         \"height\": 1920,\n         \"file_extension\": \"jpg\",\n         \"file_size\": 598879\n     }\n }\n<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"header-22\"><a><\/a><strong>resource<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"errno\": 0,\n    \"data\": {\n        \"url\": \"http:\/\/oppo.com\/********a936.pdf\",\n        \"uri_path\": \"\/********a936.pdf\",\n        \"md5\": \"d557****4931\",\n        \"sign\": \"b384****821f\",\n        \"file_extension\": \"pdf\",\n        \"file_size\": 15106\n    }\n}\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"header-23\"><a><\/a><strong>\u5931\u8d25\u793a\u4f8b<\/strong><\/h4>\n\n\n\n<p>-sign \u8fc7\u671f\u6216\u4e0d\u5408\u6cd5\uff0c\u9700\u8981\u91cd\u65b0\u8c03\u7528\u63a5\u53e3\u83b7\u53d6 sign<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"errno\": 910003,\n    \"data\": {\n        \"message\": \"Unauthorized upload &#91;1]\",\n        \"logid\": 2965369111,\n        \"ext\": &#91;]\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6c42 upload_url\uff0c\u53c2\u6570\u4e3a\u00a0\u6587\u4ef6\u4e0a\u4f20\u00a0\u63a5\u53e3\u5217\u51fa\u7684\u53c2\u6570\uff0csign \u662f\u4e00\u6b21\u6027\u7684\uff0c\u6bcf\u4e0a\u4f20\u4e00\u4e2a\u6587\u4ef6\u90fd\u9700\u8981\u91cd\u65b0\u83b7\u53d6\u4e00\u6b21\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[4876,4877,4866,4875,3293],"special":[65],"attr":[],"class_list":{"0":"post-10840","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-appsj","7":"tag-get","8":"tag-oppo","10":"tag-upload","11":"tag-url","12":"special-oppokfpt","13":"entry"},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/10840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/comments?post=10840"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/10840\/revisions"}],"predecessor-version":[{"id":10841,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/10840\/revisions\/10841"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media?parent=10840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/categories?post=10840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/tags?post=10840"},{"taxonomy":"special","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/special?post=10840"},{"taxonomy":"attr","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/attr?post=10840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}