intercom / intercom-node

Node.js bindings for the Intercom API
https://developers.intercom.com
Other
366 stars 116 forks source link

Can't this be used on the browser getting the error #123

Closed vinicitrus closed 7 years ago

vinicitrus commented 7 years ago

Please use the following template to submit your issue. Following this template will allow us to quickly investigate and help you with your issue. Please be aware that issues which do not conform to this template may be closed.

For feature requests please contact us at team@intercom.io

Version info

Not able to use with browserify and backbone.js .. Following error comes

XMLHttpRequest cannot load https://api.intercom.io/users. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access. The response had HTTP status code 406.

kant01ne commented 7 years ago

This looks like a Cross-Origin Resource Sharing issue. Intercom API doesn't provide client based API requests support. You will need to use intercom-node server-side.

ijunaid8989 commented 5 years ago

and how to do that? what is meant by server side?

jonnyom commented 5 years ago

@ijunaid8989 this SDK is intended for use on your server that interacts with Intercom, not for use in browser clients.

ijunaid8989 commented 5 years ago

Okay @jonnyom can you tell me one thing.

As Ruby Wrapper for Intercom is able to get all companies at once. how can we achieve this through an HTTP request? its don't let me get more than 60 in one request..

Nor your Elixir wrapper for Intercom. I am kind of stuck in here and I want to get all companies at once.

jonnyom commented 5 years ago

@ijunaid8989 we paginate the companies, there's no way to get all of your companies in one call. You'll need to paginate through each of the pages that we return with the response 👍