You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Unable to 'GET' contacts data using Connect REST API from JavaScript: HTTP 401

Received Response
7
Views
6
Comments
edited Jul 17, 2016 1:25PM in Integrations and APIs 6 comments

Content

I am trying to get a list of contacts from our OSvC instance using the Connect REST API for contacts object. The REST endpoint works flawlessly using SOAPUI and also when I execute it using the browser (Chrome and Firefox) directly. However when I try to use endpoint in JavaScript using a simple HTML form, the response HTTP 401 is returned.

I'm passing the 'Authorization' header in the code for a get, but when I check the network request (in Chrome Developer tools), the header is missing! Morever this same code works if I use method JSONP instead of GET.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!