apirestcj

Connecting to CJ API


Im trying to make a REST api work with VB.NET (http://help.cj.com/en/web_services/web_services.htm#Commission_Detail_Service.htm)

This is CJ commission's API.

The problem I have is that Im trying to add the service reference https://commission-detail.api.cj.com/v3/commissions but its not working, and when I go straight to that address on the web browser, its asking me for the developer key, which I have, but I dont know how to enter it.

Does anyone have a sample code on how to connect to that API?

Thanks!


Solution

  • I guess you don't need it by this time, but still, for those who'll have the similar question and get to this page: you should pass your developer key as the authorization header of your request. Depending on how you make requests, it could look something like this in VB.NET:

    HttpWebRequest.Headers.Add("authorization", "your_dev_key")