{"id":10006398,"date":"2022-09-05T13:14:41","date_gmt":"2022-09-05T05:14:41","guid":{"rendered":"https:\/\/ityet.com\/?p=10006398"},"modified":"2022-09-05T13:14:41","modified_gmt":"2022-09-05T05:14:41","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8postman%e8%b0%83%e8%af%95hms-core%e6%8e%a8%e9%80%81%e6%8e%a5%e5%8f%a3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006398","title":{"rendered":"\u5982\u4f55\u4f7f\u7528Postman\u8c03\u8bd5HMS Core\u63a8\u9001\u63a5\u53e3\uff1f"},"content":{"rendered":"<p>HMS Core<a href=\"https:\/\/link.segmentfault.com\/?enc=u903%2FlKNJvnawF1Cfq9GiA%3D%3D.oFpiuIZnDc0ARVSrofTdTt95YnmxkVf6p5946lR0rLrOmjKxCfIuAlXLJQ5D22PJwr4ii7Tgcq5oa5L075y55DZXL%2FQqAVwCyOrJ3Kb1n2A%3D\" rel=\"nofollow\">\u63a8\u9001\u670d\u52a1<\/a>\u652f\u6301\u5f00\u53d1\u8005\u4f7f\u7528HTTPS\u534f\u8bae\u63a5\u5165Push\u670d\u52a1\u7aef\u3002Postman\u662f\u4e00\u6b3e\u63a5\u53e3\u6d4b\u8bd5\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u6a21\u62df\u7528\u6237\u53d1\u8d77\u7684\u5404\u7c7bHTTP\u8bf7\u6c42\uff0c\u5c06\u8bf7\u6c42\u6570\u636e\u53d1\u9001\u81f3\u670d\u52a1\u7aef\uff0c\u83b7\u53d6\u5bf9\u5e94\u7684\u54cd\u5e94\u7ed3\u679c\u3002Postman\u53ef\u4ee5\u6a21\u62df\u5f00\u53d1\u8005\u670d\u52a1\u5668\u7533\u8bf7Access Token\uff0c\u8c03\u7528\u9274\u6743\u7b49\u63a5\u53e3\u7684\u8bf7\u6c42\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2cwh\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u56e0\u6b64\u6709\u5f88\u591a\u5f00\u53d1\u8005\u5728\u6d4b\u8bd5\u7aef\u4fa7\u63a8\u9001\u6548\u679c\u6216\u5b9a\u4f4d\u63a8\u9001\u95ee\u9898\u65f6\u90fd\u4f1a\u9009\u62e9\u4f7f\u7528Postman\u6d4b\u8bd5\u63a8\u9001\u63a5\u53e3\u3002\u4f8b\u5982\uff0c\u5f00\u53d1\u8005\u60f3\u4f7f\u7528\u63a5\u53e3\u63a8\u9001\u6d4b\u8bd5\u6d88\u606f\u4f46\u53c8\u4e0d\u65b9\u4fbf\u76f4\u63a5\u4f7f\u7528\u5e94\u7528\u6b63\u5f0f\u670d\u52a1\u7aef\u63a8\u9001\u65f6\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528Postman\u6a21\u62df\u670d\u52a1\u7aef\u7684\u63a8\u9001\u8bf7\u6c42\u3002\u6216\u8005\u670d\u52a1\u7aef\u63a5\u53e3\u8c03\u8bd5\u4e0d\u901a\uff0c\u53c8\u4e0d\u786e\u5b9a\u662f\u4e0d\u662f\u53c2\u6570\u6709\u95ee\u9898\uff0c\u5c31\u53ef\u4ee5\u7528postman\u9a8c\u8bc1\u4e00\u4e0b\u8bf7\u6c42\u662f\u5426\u6210\u529f\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4f7f\u7528Postman\u8c03\u7528HMS Core\u63a8\u9001\u63a5\u53e3\u7684\u5177\u4f53\u64cd\u4f5c\u6b65\u9aa4\u3002<\/p>\n<h3>\u4e00\u3001Postman\u4e0b\u8f7d\u5b89\u88c5<\/h3>\n<p>\u4e0b\u8f7d\u5730\u5740\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=%2FbGdXDgRw9pMF6wjrQXU5g%3D%3D.s0D63amzd4tzjSPf7n5p%2Bt4N11Dn8Wo957YgRkdTmhP3SVVQwmUEHMNqhR2vvQux\" rel=\"nofollow\">https:\/\/www.postman.com\/downl&#8230;<\/a>\uff0c\u70b9\u51fbDownload\uff0c\u4e0b\u8f7d\u5bf9\u5e94\u7248\u672c\uff0c\u7136\u540e\u5b89\u88c5\u3002\u672c\u6587\u4f7f\u7528\u7684\u662fv7.36.1\u7248\u672c\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2cwi\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5982\u679c\u7f51\u7edc\u4f7f\u7528\u4e86\u4ee3\u7406\uff0c\u9700\u8981\u7ed9Postman\u914d\u7f6e\u4ee3\u7406\uff08\u5982\u7f51\u7edc\u6ca1\u6709\u4ee3\u7406\uff0c\u8bf7\u5ffd\u7565\uff09\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00File\u83dc\u5355\uff0c\u70b9\u51fbSettings\u83dc\u5355\uff0c\u5f39\u51fa\u8bbe\u7f6e\u754c\u9762\u3002<\/li>\n<\/ol>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2cwj\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<ol start=\"2\">\n<li>\u5728\u8bbe\u7f6e\u754c\u9762\u9009\u4e2dProxy\uff0c\u914d\u7f6e\u60a8\u7684\u7f51\u7edc\u4ee3\u7406\u3002<\/li>\n<\/ol>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2cwk\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h3>\u4e8c\u3001\u8c03\u7528\u9274\u6743\u63a5\u53e3\uff0c\u83b7\u53d6Access Token\u3002<\/h3>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=C3ki53ycQmSQbumBiiq5GQ%3D%3D.ZV1V%2FbjnTgioekVnxNnuM%2FngjqP36NGFCPalJx5ztk8bj2fiq5umZGQOMcZQZWWKHRGSzH9fJu4zCOnR7GvqWLZFG8ugcn0wZmOFTOPUf1JXNwpcR5sN8Efb73ZXru9vTeQp3wR8ijA3fl79sRVjnQ%3D%3D\" rel=\"nofollow\">\u63a5\u53e3\u8bf4\u660e\u6587\u6863 <\/a><\/p>\n<ol>\n<li>\u5728Postman\u65b0\u5efa\u4e00\u4e2aTab\uff0c\u8f93\u5165\u63a5\u53e3\u5730\u5740\uff0c\u9009\u62e9POST\u65b9\u5f0f\uff1a<\/li>\n<\/ol>\n<p>post\u5730\u5740\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=cLKJmLGnM98NpF7y1xvhNw%3D%3D.92S22uMnIL0PpDn7gRaHTugGRjBK4%2BuykN1xhcJmTGwSRXQV6E1ob8LudpFoRCukYTyny72FoXxlC2LEGw2yjA%3D%3D\" rel=\"nofollow\">https:\/\/oauth-login.cloud.hua&#8230;<\/a><\/p>\n<ol start=\"2\">\n<li>\u9009\u62e9body\uff0c\u52fe\u9009\u201cx-www-form-urlencoded\u201d\uff0c\u7136\u540e\u5728\u4e0b\u65b9\u5217\u8868\u91cc\u8f93\u5165\u53c2\u6570\u540d\u79f0\u548c\u5bf9\u5e94\u7684\u503c\u3002<\/li>\n<\/ol>\n<p>\u4e09\u4e2a\u53c2\u6570\u8bf4\u660e\u5982\u4e0b\uff1a<\/p>\n<p>grant_type\u2014\u2014\u56fa\u5b9a\u503c\u201cclient_credentials\u201d\u3002<\/p>\n<p>client_id\u2014\u2014\u5bf9\u4e8eAppGallery Connect\u7c7b\u5e94\u7528\uff0c\u8be5\u503c\u4e3a\u5e94\u7528\u4e2dOAuth 2.0\u5ba2\u6237\u7aefID\uff08\u51ed\u636e\uff09\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=uSR2HHHOy5SalCbCEqVprw%3D%3D.lgplOM1cI33t%2BB%2FdDEXuedYGyKSpLuX6%2BDXTVumft3PgjKHeSdguHg1BMTuxdKw53hDBRPbSU0rBaQGOEgCDHehvmLPE4AjckkE5oh1oA5k5vr%2BIP4FEw%2FBkMMR1qzzW20sP5xf8hrDb2gt8AK2xo32hkdhGQeLIP6c53rlOWDxm%2BehrUVnGrM6pI7VotebKrpZY%2BHyqJdNU3%2BWKC0vPsQ%3D%3D\" rel=\"nofollow\">Client ID<\/a>\u3002<\/p>\n<p>client_secret\u2014\u2014\u5bf9\u4e8eAppGallery Connect\u7c7b\u5e94\u7528\uff0c\u8be5\u503c\u4e3a\u5e94\u7528\u4e2dOAuth 2.0\u5ba2\u6237\u7aefID\uff08\u51ed\u636e\uff09\u7684<a href=\"https:\/\/link.segmentfault.com\/?enc=BOowsHliHsiVjpSjBxx87w%3D%3D.fmROdDLiVikbI5Ds92CgQeX%2BuPo60eK10a%2BT2Z%2Fs5MGDalf5%2B%2FIESpOGx0jdhlGUPozcYf%2FAD9ORRttDbbqOWj7HDvzCUWqce6kFQssDqRH8sng9VVN1vbaSglDgebXTl%2FJJoPRHjXcm%2BP6TlpZdSz5JPCbp8TLmVxBBQSgiQlDYteT5CIwuBX%2Bli%2B74Az6qZku5xodrbe%2BhCS8grrWaLQ%3D%3D\" rel=\"nofollow\">Client Secret<\/a>\u3002<\/p>\n<ol start=\"3\">\n<li>\n<p>\u70b9\u51fbsend\uff0c\u5c31\u53ef\u4ee5\u8c03\u7528\u63a5\u53e3\u8fd4\u56deaccess_token\u4e86\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2cwl\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<\/li>\n<li>\u4fdd\u5b58\u8c03\u8bd5\u914d\u7f6e\uff0c\u6309\u4e0bctrl+s\uff0c\u8f93\u5165\u540d\u5b57\u201cGet Token\u201d\uff0c\u65b0\u5efa\u76ee\u5f55\u201cpush\u201d\uff0c\u5373\u53ef\u4fdd\u5b58\u3002<\/li>\n<\/ol>\n<h3>\u4e09\u3001\u8c03\u7528\u6d88\u606f\u63a8\u9001\u63a5\u53e3\u53d1\u9001Push\u6d88\u606f<\/h3>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=dZMNFE56ztndmD70ieNbsg%3D%3D.CAfnVdCOZwRpBC6gbNVIQduA0vCHivqFRFiiy68b5HUvIMMD7AwhfpKXihGa0sv%2B6kzeC9ZX6Ef74Oyb07oUma58uBzVSMCl08qYakX76nEfViet7UPl4mjnWWjy6UXQYl1RuoIPU1soI2HBiNS%2FED9SJ5Di9c%2FZJN6o5YnMErw%3D\" rel=\"nofollow\">\u63a5\u53e3\u8bf4\u660e\u6587\u6863<\/a><\/p>\n<ol>\n<li>\u5728Postman\u65b0\u5efa\u4e00\u4e2aTab\uff0c\u8f93\u5165\u63a5\u53e3\u5730\u5740\uff08\u5c06[appid]\u66ff\u6362\u4e3a\u5b9e\u9645\u7684appid\uff09\uff0c\u9009\u62e9POST\u65b9\u5f0f\uff1a<\/li>\n<\/ol>\n<p>post\u5730\u5740\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=5SWX4Ikr5UE50TJpIioLBw%3D%3D.8tAbLK7Mb8eRi02GW3ZFzxfP1%2B8Austp8y3vWz8N4qe6d4tIMWnhgM1n3e%2BRn%2FPW\" rel=\"nofollow\">https:\/\/push-api.cloud.huawei&#8230;<\/a>[appId]\/messages:send<\/p>\n<ol start=\"2\">\n<li>\u9009\u62e9Authorization\uff0cTYPE\u9009\u62e9\u201cBearer Token\u201d\uff0c\u7136\u540e\u5728Token\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u4e8c\u4e2d\u83b7\u53d6\u7684access_token\uff0c\u5982\u4e0b\u56fe\uff1a<\/li>\n<\/ol>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2cwm\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<ol start=\"3\">\n<li>\u9009\u62e9Body\uff0c\u9009\u4e2d\u201craw\u201d\uff0c\u4e0b\u62c9\u6846\u9009\u62e9\u201cJSON\u201d\uff0c\u7136\u540e\u5728\u4e0b\u65b9\u8f93\u5165\u6846\u4e2d\u590d\u5236\u6d88\u606f\u5185\u5bb9\uff0c\u70b9\u51fbsend\uff0c\u5c31\u53ef\u4ee5\u53d1\u9001\u6d88\u606f\u4e86\uff0c\u5982\u4e0b\u56fe\uff1a<\/li>\n<\/ol>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2cwn\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<ol start=\"4\">\n<li>\u4fdd\u5b58\u8c03\u8bd5\u914d\u7f6e\uff0c\u6309\u4e0bctrl+s\uff0c\u8f93\u5165\u540d\u5b57\u201cSend Message\u201d\uff0c\u4fdd\u5b58\u5728\u76ee\u5f55\u201cpush\u201d\u4e0b\u5373\u53ef\u3002<\/li>\n<\/ol>\n<h3>\u56db\u3001\u4f7f\u7528Postman\u751f\u6210\u5176\u4ed6\u5e38\u7528\u5de5\u5177\/\u8bed\u8a00\u7684\u547d\u4ee4<\/h3>\n<p>\u4f7f\u7528Postman\u5df2\u6709\u7684\u8c03\u8bd5\u6210\u529f\u7684\u63a5\u53e3\uff0c\u53ef\u4ee5\u81ea\u52a8\u751f\u6210\u5176\u4ed6\u5de5\u5177\u7684\u547d\u4ee4\uff0c\u5982\u5e38\u7528\u7684cURL\u3001Nodejs\u3001Python\u3001Ruby\u7b49\uff0c\u53ef\u4ee5\u76f4\u63a5\u590d\u5236\u4f7f\u7528\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2cwo\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u83b7\u53d6\u65b9\u5f0f\uff1a\u5728\u7a97\u53e3\u53f3\u8fb9\uff0c\u70b9\u51fbCode\uff0c\u5373\u53ef\u5f39\u51fa\u547d\u4ee4\u9875\u9762\uff0c\u53ef\u4ee5\u9009\u62e9\u81ea\u5df1\u9700\u8981\u7684\u8bed\u8a00\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u6700\u540e\u9644\u4e0a\u4f7f\u7528Postman\u5bfc\u51fa\u7684\u5b9e\u4f8b\u6587\u4ef6\uff0c\u6709\u9700\u8981\u7684\u5f00\u53d1\u8005\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165\u6d4b\u8bd5\u3002<\/p>\n<p><strong>\u4e86\u89e3\u66f4\u591a\u8be6\u60c5&gt;&gt;<\/strong><\/p>\n<p>\u8bbf\u95ee<a href=\"https:\/\/link.segmentfault.com\/?enc=UuS9N7W0QuqMCQNgnfnwlg%3D%3D.XiBIuLJP7CyUBrsT3zjBHeZrEbzLw0pUKcJMd%2BrfugqBIfAHpa7WSctBtGJpDLoxzeT9MjN7e7%2B9KeVd8Fns2A%3D%3D\" rel=\"nofollow\">\u534e\u4e3a\u5f00\u53d1\u8005\u8054\u76df\u5b98\u7f51<\/a>  <br \/>\u83b7\u53d6<a href=\"https:\/\/link.segmentfault.com\/?enc=xlMyfYhJqESnXAacV%2BNpuw%3D%3D.R4Lp8YHr7OOTvS13sFKiMoEHL2VezrIjmwBGXTzG%2F0Wpx8M7UHkWypSfkLdWI2dHlEoO6t3Y2XqNjRKZ31JiIV%2FjDr6QxZUYfQOmliP9o2U%3D\" rel=\"nofollow\">\u5f00\u53d1\u6307\u5bfc\u6587\u6863<\/a>  <br \/>\u534e\u4e3a\u79fb\u52a8\u670d\u52a1\u5f00\u6e90\u4ed3\u5e93\u5730\u5740\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=%2FoyREVduHG0YD49pBR8bNQ%3D%3D.gSSJm8nrZiStGIunUetfDmIbnwiAPsxUyZpEmkaMITw%3D\" rel=\"nofollow\">GitHub<\/a>\u3001<a href=\"https:\/\/link.segmentfault.com\/?enc=PlW8tzP5NN3vevuCOAae1A%3D%3D.RHdR7eI24wMVBS1D5nAVanhbvN56edB3QC%2FNG3I0vm8%3D\" rel=\"nofollow\">Gitee<\/a><\/p>\n<p><strong>\u5173\u6ce8\u6211\u4eec\uff0c\u7b2c\u4e00\u65f6\u95f4\u4e86\u89e3 HMS Core \u6700\u65b0\u6280\u672f\u8d44\u8baf~<\/strong><\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042431451\">https:\/\/segmentfault.com\/a\/1190000042431451<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HMS Core\u63a8\u9001\u670d\u52a1\u652f\u6301\u5f00\u53d1\u8005\u4f7f\u7528HTTPS\u534f\u8bae\u63a5\u5165Push\u670d\u52a1\u7aef\u3002Postman\u662f\u4e00\u6b3e\u63a5\u53e3\u6d4b\u8bd5\u5de5\u5177\uff0c\u5b83\u53ef [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006398","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006398"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006398\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}