# Where to get losant-rest-js files for inclusion in browser?

**URL:** <https://forums.losant.com/t/where-to-get-losant-rest-js-files-for-inclusion-in-browser/2013>\
**Category:** Help\
**Tags:** rest-api\
**Created:** [July 18, 2019, 4:10pm UTC](https://forums.losant.com/t/where-to-get-losant-rest-js-files-for-inclusion-in-browser/2013 "2019-07-18T16:10:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 18, 2019, 4:24pm UTC](https://forums.losant.com/t/where-to-get-losant-rest-js-files-for-inclusion-in-browser/2013/2 "2019-07-18T16:24:23Z")

</div>

We don’t provide a pre-bundled library for browsers. It’s usually brought into the browser using a module bundler like Webpack or Gulp.

That being said, there are very few use cases where we’d recommend accessing the Losant API directly from a browser. It’s primarily intended for service-to-service requests. The reason is because whatever user has your web page loaded will have access to the token being used for authentication. The Losant API provides fairly broad access to the underlying application and there’s no way to protect the token in a client-side environment.

When it comes to accessing Losant from a browser, we strong recommend building a custom API using Experience Endpoints. Your users then authenticate as Experience Users and receive a token that can only be used to access these Endpoints. You then have full control over what those users can access using workflows triggered by each request.

Here’s a post I wrote with a few more details:

> [@Authorization token in ajax request](https://forums.losant.com/t/authorization-token-in-ajax-request/1928/2):
>
> Hey Nahuel, Making requests directly against the Losant API cannot be made by an Experience User’s authentication token. The tokens provided by Experience Users (i.e. logged in via [onlosant.com](http://onlosant.com) page) are used for identification and authentication when they make requests against Experience Endpoints. The Losant API provides broad access to an application’s resources, and it not likely a level of access you want to expose to your Experience Users. This is why we introduced the Experience Endpoin…

---

_[View the full topic](https://forums.losant.com/t/where-to-get-losant-rest-js-files-for-inclusion-in-browser/2013)._
