- 访问ebay卖家账号授权链接获取授权码
链接:
https://auth.ebay.com/oauth2/authorize?client_id=********************
&redirect_uri=*************
&response_type=code
&scope=https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.marketing.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.marketing%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.account.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.account%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.fulfillment.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.fulfillment%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.analytics.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.finances%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.payment.dispute%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fcommerce.identity.readonly
&prompt=login
client_id:ebay开发者账号的:APPid
redirect_uri:ebay开发者账号的:RunName
- 访问上述链接。 将会跳转到ebay登录页面。 按提示登录。登录成功后将会进入授权页面。点击确认授权。
- 确认授权后。 将会跳转已成功授权页面。复制出这个页面的链接
- 链接格式:
- https://signin.ebay.com/ws/eBayISAPI.dll?ThirdPartyAuthSucessFailure&isAuthSuccessful=true&code=v%5E1.1%23i%5E1%23r%5E1%23p%5E3%23f%5E0%23I%5E3%23t%5EUl4*************FRDhBNTRFNUE4RjU0MDZGQjAwNkJfMF8xI0VeMjYw&expires_in=299
- 转码链接中的code值 在线转码工具:https://meyerweb.com/eric/tools/dencoder/
- 转码前:=v%5E1.1%23i%5E1%23r%5E1%23p%5E3%23f%5E0%23I%5E3%23t%5EUl4*************FRDhBNTRFNUE4RjU0MDZGQjAwNkJfMF8xI0VeMjYw
- 转码后:v^1.1#i^1#f^0#r^1#I^3#p^3#t^Ul4*******************QUNEQ0IwMEVGOUYyNzlEMzFFMjFfMl8xI0VeMjYw
- 请求ebay接口获取refresh_token
接口地址:https://api.ebay.com/identity/v1/oauth2/token
请求方式:POST
content-Type application/x-www-form-urlencoded
Authorization Basic 你的开发者秘钥
(开发者秘钥为ebay开发者账号转码后的结果):
转码参考工具:https://www.base64encode.org/
参数:grant_type=authorization_code&code=上述获取的code值&redirect_uri=你的ebay开发者账号的:RunName
请求返回结果:
获取ebay refresh_token 成功,记录保存好。 over
Comments NOTHING