对接亚马逊 SP-API(Amazon Selling Partner API) 第二章:授权

本文详细阐述了如何通过Marketplace Appstore、网站授权和自定义开发流程来授权Amazon SP-API应用程序,涉及OAuth工作流、变量设置、错误代码解析和刷新令牌获取。适合开发者理解和实施对接过程。

目录

1. 授权销售伙伴 API 应用程序

1.1. Marketplace Appstore workflow

1.2. Website workflow(推荐使用)

1.3. 自行授权(仅限店铺本身为开发者)

2. 全局变量(后续将会使用绿色加粗字体表示)

AMAZON_ENDPOINT

APPLICATION_ID

OAUTH_LOGIN_URI & OAUTH_REDIRECT_URI

​CLIENT_ID & CLIENT_SECRET

3. OAuth authorization URIs

4. Marketplace Appstore workflow

Step 1. The seller initiates authorization from the Marketplace Appstore

Step 2. The seller consents to authorize your application

Step 3. The seller signs into your website

Step 4. Amazon sends you the authorization information

BUG 合集

Step 5. Your application exchanges the LWA authorization code for an LWA refresh token

BUG 合集

5. Website workflow

Step 0. Set up an "Authorize" button

Step 1. The seller initiates authorization from your website

Step 2. The seller consents to authorize the application

Step 3. Amazon sends you the authorization information

Step 4. Your application exchanges the LWA authorization code for a LWA refresh token

6. Self authorization

6.1. 应用商店 --> 开发应用程序

6.2. 生成刷新令牌

总结

对接亚马逊 SP-API(Selling Partner API) 第三章:对接 SDK


1. 授权销售伙伴 API 应用程序

销售伙伴可以使用下列其中一个工作流程授权您的应用程序:

1.1. Marketplace Appstore workflow

从商城应用商店详情页面启动的 OAuth 授权工作流程。

1.2. Website workflow(推荐使用)

从您自己的网站启动的 OAuth 授权工作流程。

1.3. 自行授权(仅限店铺本身为开发者)

https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md#self-authorization

获取 Refresh token

2. 全局变量(后续将会使用绿色加粗字体表示)

AMAZON_ENDPOINT

Selling region Endpoint
North America (Canada, US, Mexico, and Brazil marketplaces) Amazon
Europe (Spain, UK, France, Netherlands, Germany, Italy, Sweden, Poland, Turkey, U.A.E, and India marketplaces) https://sellercentral-europe.amazon.com

Far East (Singapore, Australia, and Japan marketplaces)

日本:Amazon

备注:其他区域我没帐号了。不能提供准确的 endpoint。

这个应该跟亚马逊后台的域名是一致的。

 Seller Central URLs

APPLICATION_ID

OAUTH_LOGIN_URI & OAUTH_REDIRECT_URI

关于这两个我有句MMP一定要讲!这两个是可以随便填,但是要保证域名是一样的。不能是下图。(这个地方花了我两天时间!!!)并且是https开头的。


CLIENT_ID & CLIENT_SECRET

3. OAuth authorization URIs

构建授权链接,让各个店铺去登录这个链接完成授权。

链接结构如下:

{ AMAZON_ENDPOINT}/apps/authorize/consent?{ APPLICATION_ID}

Example:

评论 88
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值