快工助手跨境电商知识与商机助手

How can I authorize a shop using Postman?

Shopee 官方资料 · Shopee Open Platform 常见问题(FAQ) · 适合开发者

stable本次发布有变化全部展示

来自 Shopee 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
Shopee / profile.shopee.faq
语言
en
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/shopeeaudience/developercategory/help_centertopic/apitopic/authorization-flowtopic/developertopic/faqtopic/seller-authorization

资料正文

§1 How can I authorize a shop using Postman?

Here is the example for test-stable environment:

  1. Get your Test Partner_id from Open Platform Console:

https://open.shopee.com/myconsole/management/app?from=header

If you don't have Test Partner_id, please create one. Kindly note that Test Partner_id is only available for sandbox/test-stable environment. lf you want to test in production environment, please use the Live Partner_id.

Get your test shop from Open Platform Console:

https://open.shopee.com/myconsole/tools/test-account

If you don't have a test shop, please create one.

  1. Create a sign base string: "partner_id", API path, "timestamp"

For example:

(you can get the "timestamp" using this tool: https://tool.lu/timestamp/)

For example:

Base string: 1001141/api/v2/shop/auth_partner1642507340

  1. Generate the "sign" using HMAC-SHA256

(you can use this tool for generation :https://www.freeformatter.com/hmac-generator.html#ad-output)

Then you will get the sign

f07af16f3ea7c32ada64e215754f4d8a105b9dbecdf27b6141635b515a8f3060

4.Make a authorization link:

https://partner.test-stable.shopeemobile.com/api/v2/shop/auth_partner?partner_id=1001141&redirect=https://www.baidu.com/&timestamp=1642506704&sign=fad0d35d91cbf3ad2d234a1d17b555fffad5d5908937e7540b004cec544292eb

Note: The timestamp of this link should be same as the timestamp you use to generate your sign)

5.Open a blank page in Google Chrome and copy your authorization link, then you will get this page:

please login your test shop account, If you create the test merchant, please click the "switch to sub account" to login

  1. Get the shop id and code from the call back url

7.Then please call the GetAccessToken api to get the access token

(How to generate sign for GetAccessToken sign)

#