【问题标题】:Create Listing in Etsy using PHP api not working使用 PHP api 在 Etsy 中创建列表不起作用
【发布时间】:2016-09-17 05:58:29
【问题描述】:

我正在使用 php oAuth 在 Etsy 中创建一个列表。我将以下参数发送到 api 调用“数量、标题、描述、价格、who_made、when_made、is_supply”。 我正在关注文档作为参考here

这是流程

  1. 通过 etsy 使用 oAuth 进行身份验证。

  2. 使用此 api 调用获取范围 https://openapi.etsy.com/v2/oauth/scopes

这些工作正常。但是在创建列表时我遇到了以下错误。

"Invalid auth/bad request (got a 403, expected HTTP/1.1 20X or a redirect)"

3.我创建listing的过程

  $url = "https://openapi.etsy.com/v2/listings/";

  $params = array('description' => 'thisisdesc', 'price'=>'1.00', 'quantity'=>'2', 'title'=>'thisistitle', 'who_made'=>'collective', 'is_supply'=>'false','when_made'=>'2010_2015', 'category_id' => '69105467','shipping_template_id' => '110906760173');
  $data = $oauth->fetch($url, $params , OAUTH_HTTP_METHOD_POST);
  $json = $oauth->getLastResponse();
  print_r($json);

它显示错误消息。无效的身份验证/错误请求。

请有任何想法/建议。

【问题讨论】:

    标签: php oauth etsy


    【解决方案1】:

    改变

    $url = "https://openapi.etsy.com/v2/listings/";
    

    $url = "https://openapi.etsy.com/v2/listings";
    

    末尾的额外 / 可能导致问题

    您能否尝试删除“/”并在可能的情况下显示响应详细信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多