Start a new topic

DEAR API - Incorrect Credentials

I'm trying to connect to DEAR API using a constructed URL to show the JSON in my browser.. 


When I use the API explorer, the API shows the following constructed URL:


https://inventory.dearsystems.com/ExternalApi/ProductAvailability?Page=1&Limit=1000&Category=hats


But obviously, pasting that in the URL bar shows 'incorrect credentials!'. I'm guessing I will need to place my key variable or something in there for it to authenticate and process the request to return the JSON from my DEAR data but I can't find any information on what it's expecting or how to do it.


I'm not sure why you'd want to access the API through your browser, but you are not sending any credentials with your request.

There are some working examples of python code in this thread:

http://support.dearsystems.com/support/discussions/topics/11000004876

Oops, I can't edit my last comment but 'not' should have been 'now' :D

I've been fighting this for the last 3 days at least and getting nowhere. DEAR help are unable to help and basically have come back with: 


"Unfortunately at this stage we don't have a code sample that can aid you. Some code samples are provided in the articles but we don't have a samples for PHP."


Do any users have a PHP example they've used to connect to DEAR and then been able to pull data in to an html table or similar? Originally I was attempting to connect straight from Google Sheets but I'm not trying to do it in two stages. Get the data listed as an html table and then scrape that in to Google Sheets.

Login or Signup to post a comment