Etsy リストを管理するための Mac アプリを作成しています。私は Objective-C と OauthConsumer ライブラリを使用しています。
認証トークンを正常に取得し、リストとカテゴリを取得しました。
次に、リストを作成したいと思います。テストに最低限必要なフィールドを含むディクショナリを作成します。
これがデバッグ出力です。oauth_token を変更しました。
問題が見えますか?ありがとう
2016-08-28 12:31:09.042 商品[32465:16639890] listDictionary: {
params = {
"category_id" = 323;
description = "testing - not for sale";
"is_supply" = false;
price = 3000;
quantity = 1;
title = "testing - not for sale";
"when_made" = 1920s;
"who_made" = "someone_else";
};
}
2016-08-28 12:31:09.042 Goods[32465:16639890] jsonString: {"params":{"title":"testing - not for sale","when_made":"1920s","who_made":"someone_else ","quantity":"1","is_supply":"false","price":"3000","category_id":"323","description":"テスト - 非売品"}}
2016-08-28 12:31:12.475 商品[32465:16639890] urlString: https://openapi.etsy.com/v2/listings/
2016-08-28 12:31:12.476 商品[32465:16639890] リクエスト: URL: https://openapi.etsy.com/v2/listings/
allHTTPHeaderFields: {
Authorization = "OAuth realm=\"\", oauth_consumer_key=\"b2ttpixxxxxxxxnciaubi8\", oauth_token=\"xxxxxxxxxxxx\", oauth_signature_method=\"HMAC-SHA1\", oauth_signature=\"NHSLUPAZyrtOrEI%2BAQCV9w74%2BIc%3D\", oauth_timestamp=\"1472409072\", oauth_nonce=\"BF3E6982-695E-4EF4-AD70-BDF8A401A65B\", oauth_version=\"1.0\"";
method = createListing;
}
_signatureBaseString: POST&https%3A%2F%2Fopenapi.etsy.com%2Fv2%2Flistings%2F&oauth_consumer_key%3Db2ttpia1jk3j2ijhnciaubi8%26oauth_nonce%3DBF3E6982-695E-4EF4-AD70-BDF8A401A65B%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1472409072%26oauth_token%3D840f745e22136b6351500b567ee6c9%26oauth_version% 3D1.0
2016-08-28 12:31:12.476 Goods[32465:16639890] configuration.HTTPAdditionalHeaders: (null)
2016-08-28 12:31:12.477 商品[32465:16639890] etsyItem:
2016-08-28 12:31:13.069 商品[32465:16640021] statusCode: 403
2016-08-28 12:31:13.069 商品[32465:16640021] hTTPURLResponse.allHeaderFields: {
"Cache-Control" = private;
Connection = close;
"Content-Length" = 766;
"Content-Type" = "text/plain;charset=UTF-8";
Date = "Sun, 28 Aug 2016 18:31:13 GMT";
Server = Apache;
"X-Cnection" = close;
"X-Error-Detail" = "oauth_problem=signature_invalid&debug_sbs=POST&https%3A%2F%2Fopenapi.etsy.com%2Fv2%2Flistings%2F&oauth_consumer_key%3Db2ttpia1jk3j2ijhnciaubi8%26oauth_nonce%3DBF3E6982-695E-4EF4-AD70-BDF8A401A65B%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1472409072%26oauth_token%3D840f745e22136b6351500b567ee6c9%26oauth_version%3D1.0%26%257B%2522params%2522%253A%257B%2522title%2522%253A%2522testing_-_not_for_sale%2522%252C%2522when_made%2522%253A%25221920s%2522%252C%2522who_made%2522%253A%2522someone_else%2522%252C%2522quantity%2522%253A%25221%2522%252C%2522is_supply%2522%253A%2522false%2522%252C%2522price%2522%253A%25223000%2522%252C%2522category_id%2522%253A%2522323%2522%252C%2522description%2522%253A%2522testing_-_not_for_sale%2522%257D%257D%3D";
"X-Etsy-Request-Uuid" = 084ELjPQBbhJzUjLaOa3XxHVfwSh;
}