doujiao1949 2015-11-02 02:50
浏览 62

使用PHP api在Etsy中创建列表无法正常工作

I'm creating a listing into Etsy using php oAuth.I'm sending following params to api call "quantity,title,description,price,who_made,when_made,is_supply". I'm following the document as reference here

This is the process flow

  1. Authenticating with etsy using oAuth.

  2. Getting scopes using this api call https://openapi.etsy.com/v2/oauth/scopes

These are working fine.But while creating listing i'm getting following error.

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

3.The process I followed for create 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);

It displays error message.Invalid auth/bad request.

Any ideas/suggestions please.

  • 写回答

1条回答 默认 最新

  • down123321123 2016-09-16 21:58
    关注

    Change

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

    to

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

    The extra / at the end may be causing the issue

    Can you try removing the '/' and if possible show the response details.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题