标签: ebay-api

什么是 Auth'n'auth?

在 developer.eBay 上请求我的密钥,我看到一条消息,邀请我启用 OAuth。但该消息也谈到了Auth'n'auth

在谷歌上搜索它并没有给我任何关于这是什么的信息,所以我在这里问。

eBay 给我的完整信息是:

要使用 eBay 的最新安全功能,请将 OAuth 安全性添加到您的密钥中。这些密钥将同时支持 Auth'n'auth 和 OAuth。

对于具有多个重定向 URL 的密钥,请转到令牌页面并仅为 OAuth 启用一个重定向 URL。所有重定向 URL 将继续支持 Auth'n'auth。

authentication oauth ebay-api

6
推荐指数
1
解决办法
2160
查看次数

eBay API 在生产中总是返回 invalid_client,但沙箱工作正常

我已经解决这个问题好几天了,但似乎找不到解决方案。

我正在尝试通过 eBay API 授权以获取用户令牌以进行进一步操作。

当我使用沙箱环境时,一切都很好,但是一旦我使用生产环境,我就会收到以下错误:

{"error":"invalid_client","error_description":"client authentication failed"}
Run Code Online (Sandbox Code Playgroud)

我的文件结构如下:

配置.php:

<?php
    /* SAndbox 
$config = [
    'client_id' => 'xxxxx-xxxxxx-SBX-e55b66fda-63c7e331',
    'client_secret' => 'SBX-xxxxxx-dxxxxxb-47cb-9bee-f33b',
    'ru_name' => 'xxxxxxxxx-oxxxxas-xxxxxxx-tsuggc',
    'login_url' => 'https://auth.sandbox.ebay.com/oauth2/authorize',
    'oauth_url' => 'https://api.sandbox.ebay.com/identity/v1/oauth2/token',
    'api_scopes' => ['https://api.ebay.com/oauth/api_scope/sell.inventory'],
];
*/

$config = [
    'client_id' => 'xxxxxx-CxxxxxxT-PRD-455bfe8ea-7e445131',
    'client_secret' => 'PRD-797xxxx7bf-d5xxxc-4a19-axxade-ab8xx6',
    'ru_name' => 'xxxxxxx-osxxxxxxas-CxxxxS-hjlalp',
    'login_url' => 'https://auth.ebay.com/oauth2/authorize',
    'oauth_url' => 'https://api.ebay.com/identity/v1/oauth2/token',
    'api_scopes' => ['https://api.ebay.com/oauth/api_scope/sell.inventory'],
];
Run Code Online (Sandbox Code Playgroud)

获取登录.php:

<?php
include_once 'config.php';

$url = $config['login_url'];
$url .= '?client_id='.$config['client_id'];
$url .= '&response_type=code';
$url .= '&redirect_uri='.urlencode($config['ru_name']);
$url .= '&scope='.implode(' ', $config['api_scopes']); …
Run Code Online (Sandbox Code Playgroud)

php oauth ebay-api

6
推荐指数
1
解决办法
1655
查看次数

如何使用 Ebay 的刷新令牌获取 access_token?

我正在尝试从 eBay 获得的刷新令牌中获取 access_token。我正在使用 Axios,但我不断收到不支持请求中的授权类型错误。

  const refreshToken = 'xxxxxxxx';
  const appID = 'xxxxxxx';
  const certID = 'xxxxxx';
  const scopes = [
        'https://api.ebay.com/oauth/api_scope',
        'https://api.ebay.com/oauth/api_scope/sell.fulfillment',
        'https://api.ebay.com/oauth/api_scope/sell.account',
        'https://api.ebay.com/oauth/api_scope/sell.inventory'
  ]
  const params = {
    grant_type: 'refresh_token',
    refresh_token: refreshToken,
    'scope': encodeURI(scopes.join(" ")),
    // scope: scopes,
  

const token = Buffer.from(`${appID}:${certID}`);
const URL = 'https://api.ebay.com/identity/v1/oauth2/token'
const { data } = await axios.post(URL, params, {
      'headers': {
        'Authorization': `Basic ${token.toString('base64')}`,
        'Content-Type': 'application/x-www-form-urlencoded',
      },
    })
Run Code Online (Sandbox Code Playgroud)

node.js openid-connect ebay-api ebay-sdk

6
推荐指数
1
解决办法
442
查看次数

我需要更多了解 eBay API 的工作原理

我已经在该网站中查看了 PHP 代码中的许多示例,但他们每次都使用不同的技术,而且一点也不简单!我已经下载了ebaySession.phpkeys.php文件。我已经成功整合了ebaysession类并与ebay取得了联系。但如何使用sendHttpRequest()方法让我感到困惑。没有解释如何获取用户帐户信息。

许多教程还表明,eBaySession类的构造函数将请求令牌作为最后一个参数,而我的文件将用户令牌作为第一个参数。与 eBay 的 API 文档存在许多不一致之处。我有一个带有令牌的测试用户帐户......

我也不明白的是,为什么eBaySession构造函数需要UserTokencallname,而在 eBay 的示例中,调用名称和 usertoken 包含在 XML 字符串中......

一个简单的问题,我在 eBay 文档中看不到明确的答案,如何进行简单的调用,然后检索变量中的结果/响应?我已经通过一个简单的搜索查询实现了这一点,但当它需要用户信息和身份验证时,似乎无法让它工作...此外,eBay 的搜索示例使用 URL 类型查询,例如

// Construct the findItemsByKeywords HTTP GET call
$apicall = "$endpoint?";
$apicall .= "OPERATION-NAME=findItemsByKeywords";
$apicall .= "&SERVICE-VERSION=$version";
$apicall .= "&SECURITY-APPNAME=$appid";
$apicall .= "&GLOBAL-ID=$globalid";
$apicall .= "&keywords=$safequery";
Run Code Online (Sandbox Code Playgroud)

然后另一个例子使用:

///Build the request Xml string
$requestXmlBody = '<?xml version="1.0" encoding="utf-8" ?>';
$requestXmlBody .= '<FetchTokenRequest xmlns="urn:ebay:apis:eBLBaseComponents">';
$requestXmlBody .= …
Run Code Online (Sandbox Code Playgroud)

php ebay-api

5
推荐指数
1
解决办法
6170
查看次数

使用api更新ebay上的订单状态?

我使用eBay getorder API获得订单列表,但现在我想选择订单并更新其状态.

我怎样才能做到这一点?请,任何帮助将不胜感激

我正在使用互联网上的一些代码,它显示了改变状态的"成功".但是,当我再次加载订单列表时,它仍然是"完整"(或者如果我在api中使用运输=假)仍然是"完整".

码:

    //create the context
    ApiContext context = new ApiContext();

    //set the User token
    context.ApiCredential.eBayToken = "token";

    //set the server url
//    context.SoapApiServerUrl = "https://api.sandbox.ebay.com/wsapi";
    context.SoapApiServerUrl = "https://api.ebay.com/wsapi";


    //enable logging
    context.ApiLogManager = new ApiLogManager();
    context.ApiLogManager.ApiLoggerList.Add(new FileLogger("log.txt", true, true, true));
    context.ApiLogManager.EnableLogging = true;

    //set the version
    context.Version = "705";
    context.Site = SiteCodeType.UK;

    //Create the call and set the fields
    CompleteSaleCall apicall = new CompleteSaleCall(context);

    //Either ItemID-TransactionID or OrderLineItemID or OrderID is required. If item is part of …
Run Code Online (Sandbox Code Playgroud)

.net c# ebay-api

5
推荐指数
1
解决办法
3238
查看次数

如何在Python ebay sdk中添加多张图片

这是我的设置:

Python 3.4

使用Trading API

试图打电话给eBay的"VerifyAddItem"

我标记了我在哪里得到错误,PicURL并且我正在尝试发布多个带有多个URL的图片.我目前只是尝试了两张图片让我们说http://i.ebayimg.com/picture1http://i.ebayimg.com/picture2.(我意识到这些不是真实的图片,但这不是我遇到的问题的一部分)

eBay API Documentations声明To specify multiple pictures, send each URL in a separate, PictureDetails.PictureURL element. The first URL passed in will be the Gallery image and appears on the View Item page.所以我尝试通过以下两行无济于事:

"PictureDetails": {"PictureURL": ["http://i.ebayimg.com/picture1",
                                  "http://i.ebayimg.com/picture2"]}
Run Code Online (Sandbox Code Playgroud)

"PictureDetails": [{"PictureURL": "http://i.ebayimg.com/picture1"},
                   {"PictureURL": "http://i.ebayimg.com/picture2"}]
Run Code Online (Sandbox Code Playgroud)

我分别从eBay的连接中得到以下错误:

VerifyAddItem: Class: RequestError, Severity: Error, Code: 37, Input data is invalid. 
Input data for tag <Item.PictureDetails.PictureURL[2]> is invalid or missing. Please 
check API …
Run Code Online (Sandbox Code Playgroud)

python trading python-3.x ebay-api

5
推荐指数
1
解决办法
520
查看次数

eBay Trading API - 如何为要发货的订单获取发货标签?

我能够通过 eBay GetSellerList(Trading API) 和GetOrders(Fulfillment API) 调用获取卖家的订单。我还找到了一个CompleteSale用于处理订单的 API ,但找不到任何用于生成运输标签的 API,例如此示例 Label

任何帮助表示赞赏。TIA

ebay-api

5
推荐指数
0
解决办法
358
查看次数

eBay API 请求错误:“访问令牌无效。检查授权 HTTP 请求标头的值。

  • 我已在 eBay 注册为开发人员并创建了一个应用程序。
  • 我生成了 Oauth(不是 Auth'n'Auth)
  • 使用 Postman 生成简单的请求(图像)并收到令牌无效的错误
  • 错误:Invalid access token. Check the value of the Authorization HTTP request header.

在此输入图像描述

我在这里做错了什么?

bearer-token ebay-api

5
推荐指数
1
解决办法
3100
查看次数

Ebay oauth“输入请求参数无效。” 征得用户同意

https://auth.sandbox.ebay.com/oauth2/authorize?
client_id=${clientID}
&redirect_uri=https://localhost:3000/ebay/callback
&response_type=code
&scope=https%3A%2F%2Fapi.ebay.com%2Foauth%2Fscope%2Fsell%40user
Run Code Online (Sandbox Code Playgroud)

我不断收到此错误:{“error_id”:“invalid_request”,“error_description”:“输入请求参数无效。”,“http_status_code”:400}

我正在按照此网站的说明进行操作

请谁能解释一下为什么我会收到此错误?

authentication node.js oauth-2.0 ebay-api

5
推荐指数
1
解决办法
1582
查看次数

eBay API OAuth 范围问题“请求的范围无效、未知、格式错误或超出授予客户端的范围”

我一直在尝试沙箱和生产 eBay API。我设法让沙箱 API 正常工作,但前提是范围列表为空。如果我添加范围,它会返回一条错误消息The requested scope is invalid, unknown, malformed, or exceeds the scope granted to the client。我试图了解为什么会发生此错误以及如何更改范围。

这是为沙盒 API 返回的成功访问令牌。请注意,scopes 参数是如何未被选中的,并且不会在请求正文中发送。范围列表未指定,但它仍然有效并返回访问令牌。为什么是这样?不需要瞄准镜吗?

在此输入图像描述

当我启用范围时,我收到错误

请求的范围无效、未知、格式错误或超出授予客户端的范围

让我们看一个例子:

我想使用“客户端凭据授予类型”而不是“授权代码授予”。请注意,客户端凭据不需要用户授权,因为它仅供应用程序使用。因此,这篇文章不适用于该问题。

这是我的应用程序密钥集可以访问的客户端凭据范围。

在此输入图像描述

在这里,我创建并发送具有“https://api.ebay.com/oauth/api_scope”范围的请求。我已经根据文档对范围进行了 URL 编码。

在此输入图像描述

在此输入图像描述

在这里,我在邮递员中创建并发送请求,未指定范围。成功返回访问码。

在此输入图像描述

为什么指定范围后访问代码请求会失败?我是否不需要指定范围,因为我在文档中看到了这一点......

在此输入图像描述

我如何知道端点是否属于“ebay 调用”并且不需要范围?....或者它需要范围吗?

token access-token oauth-2.0 ebay-api

5
推荐指数
1
解决办法
1582
查看次数