0

So I'm trying to access a client's API to ultimately build a product feed. Their API Dev Docs show examples using curl commands. I"m wondering if someone can help me figure out how to achieve the same thing in C# (either a command line exe, or an asp.net app).

  1. I first need to create a session.

The curl example:

curl -v -u {client_id}:{client_secret} "https://www.clientsite.com/api/v2.0/sessionid"

  1. Then I need to call the API for products with the session just created (A cookie named JSESSIONID is created).

The curl example:

curl -v -u {client_id}:{client_secret} "https://www.clientsite.com/api/v2.0/products;jsessionid={jsessionid}"

Any help is appreciated!

Justin P
  • 31
  • 3
  • So what did you try? `curl -u user:pass` simply performs basic authentication, which you can read in the manual. So search for "C# http request basic authentication", and you'll find your answer. – CodeCaster Feb 02 '16 at 18:09
  • Right, but the part I"m having a problem with is getting the session ID and passing it into my product query. – Justin P Feb 02 '16 at 18:50
  • Then please edit that into your question. It's unclear what code you have and what exactly you want it to do. – CodeCaster Feb 02 '16 at 21:18

0 Answers0