1

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.

Sevle
  • 3,109
  • 2
  • 19
  • 31
Gowri
  • 1,832
  • 3
  • 29
  • 53

1 Answers1

1

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.

Adam Dale
  • 11
  • 2