Creating a new Listing - C#

933 views
Skip to first unread message

Brandon Hong

unread,
Jun 20, 2016, 5:43:35 PM6/20/16
to Etsy API

Hello fellow developers, 

I've been EXTREMELY stuck for the past couple days trying to figure out how to create a new listing (just for testing purposes right now) in a C# console application.
So far, i've done the OAuth authentication process, from which i received my permanent access_token and secret. However, the Etsy API documentation ONLY provides very basic, brief php examples and BARELY gives any other information on making authenticated requests to write user data (or even any type of request for that matter). 

As a result, I am stuck on:

(1) Passing my access token with an web request to make an authenticated request
(2) Making an authenticated request to create new listings
        - More specifically, I don't know how to structure the URL that I am using for the POST method to create a new listing

Attached is my relevant code:











Here is the MakeRequest Method:


Any help would be greatly appreciated!




david olick

unread,
Jun 21, 2016, 11:38:57 AM6/21/16
to Etsy API V2
It's hard to say without knowing more, but are you sure the POST data should be a JSON string?  If you don't know whether your data is being converted to the usual http POST format you may need to do some packet sniffing and see how your data is getting sent out.


--
David Olick
Oriku Inc.

--
You received this message because you are subscribed to the Google Groups "Etsy API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etsy-api-v2...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brandon Hong

unread,
Jun 21, 2016, 11:52:38 AM6/21/16
to Etsy API, david...@gmail.com
Hey thanks for the reply david! I am using RestSharp api to create my requests automatically... This creates the request in the proper format. I've made a little progress since yesterday - using base url https://openapi.etsy.com/v2/private/listings?api_key=xxxxxxxxxxxx i created the request, but keep getting the error message : "This is a restricted API key and this user is not in the authorized set. Please contact the app creator for more information."

Im quite confused about this error as i've received my access token and secret under the proper permission scopes AND the registered api key for my app is under the SAME account that i'm trying to create a new listing in..... very confused right now
I wish etsy would provide more details and USEFUL examples in their documentation

Brandon Hong

unread,
Jun 21, 2016, 12:02:37 PM6/21/16
to Etsy API, david...@gmail.com
UPDATE: instead of using "api_key" as the parameter, i changed it to "oauth_consumer_key" (still with the same api key value, however) and the error changed to 
"Server Error" 

Any ideas what may be causing this?


On Tuesday, June 21, 2016 at 11:38:57 AM UTC-4, david olick wrote:

Kristin Veck

unread,
Jun 21, 2016, 4:20:24 PM6/21/16
to etsy-...@googlegroups.com, david...@gmail.com
I am happy to help - I struggled quite a bit to get me C# client up and running. 
I have two esty apps written in c# - one uses RestSharp libraries to make the API requests and do the OAuth signing, the other uses OAuth Net code (http://oauth.net/code/) to perform the OAuth signing and System.Net.HttpClient and System.Net.HttpResponse to make/get the http requests.

Which method would you prefer to use?
Also - have you been successful to use any GET API methods that require OAUTH?

Kris.

Brandon Hong

unread,
Jun 21, 2016, 6:10:35 PM6/21/16
to Etsy API, david...@gmail.com
Thanks for the reply kveck!! I'd prefer to use the RestSharp library because it's easier and i've already started using this approach(although i feel it would be really useful to learn System.net). 

I haven't tried GET methods that REQUIRE oauth signing, but GET methods with basic api_key authentication work perfectly fine.
I'm not sure if you saw but i posted another thread in which i describe my issue in more detail.... (That thread also contains my debugging information - i.e request and response headers)
 - currently, the issue that im facing is an HTTP 500 Internal server error when calling POST method to create new listing

Brandon Hong

unread,
Jun 22, 2016, 2:39:43 PM6/22/16
to Etsy API, david...@gmail.com
bump


On Tuesday, June 21, 2016 at 4:20:24 PM UTC-4, kveck wrote:

Faisal Pathan

unread,
Jun 12, 2018, 3:34:32 PM6/12/18
to Etsy API
Please any one can send Oath request and API call example in c#  ? 
Message has been deleted

Manuel Reinfurt

unread,
Nov 12, 2020, 3:33:27 PM11/12/20
to Etsy API
Sure! I've written an article about it here: https://manuelreinfurt.medium.com/use-etsy-api-with-oauth-1-0-in-asp-net-core-c-819fb6edd376
You can find the example on GitHub: https://github.com/mreinfurt/etsy-aspnetcore

Hope it helps!

Etsy Developer Support

unread,
Nov 25, 2020, 3:46:17 PM11/25/20
to 'Manuel Reinfurt' via Etsy API

Hello there,

Thanks for writing to Etsy. Please know that this is an automatic email as we’re currently experiencing an extremely high volume of emails, and we realize you’ve been waiting to hear from us for some time.

We’d encourage you to read through the following email thoroughly, and if you don’t find an answer to your concern, please reply directly to this email to ensure the quickest response.

If your reason for contacting us has been resolved since you reached out to us, there’s no need to take any further action. If you still have questions or concerns, we’d encourage you to check out the following resources:

  • Etsy API documentation
  • Etsy Developer Google Group
  • Note that all apps are built by 3rd party developers off of our platform—meaning that Etsy isn't the party that exports or imports data. Instead, it's up to said integration to ensure that they are successfully handling any data related to your Etsy shop.. Any further troubleshooting may be best addressed with their team.

If you’re unable to find the help you need in one of our Help articles, please reply to this email and we’ll ensure that we prioritize your response to get back to you as soon as possible.

We’re so grateful to have you as a member of our community, and we’d like to take this opportunity to let you know that we’re growing our team to improve our response time going forward so that we can provide you with the support you expect and deserve from Etsy.

We truly appreciate your patience and understanding. If we can be of any further assistance, please let us know.

Best,
Joey
Etsy Developer Support
https://www.etsy.com/developers/

―――

This message is a private conversation between you and Etsy. Please respect this confidentiality and refrain from distributing this communication without permission from Etsy. If you feel this message was sent to you in error, please delete it and let us know. Please note that feedback or ideas you share with us are non-confidential and non-proprietary to you. You can read more in Etsy's Terms of Use (Section 6).

If you live in North America or South America, this email is sent by Etsy, Inc., 117 Adams Street, Brooklyn, NY 11201, USA; if you live elsewhere, this email is sent by Etsy Ireland UC, a subsidiary of Etsy, Inc., 66/67 Great Strand Street, Dublin 1, D01 RW84, Ireland having company registration number 495696 and VAT registration number IE9777587C. All rights reserved.

Reply all
Reply to author
Forward
0 new messages