*** id: db812539-9c02-4e75-b855-22f5a693a80e title: SignalWire Client sidebar-title: Overview position: 0 slug: /js/reference/signalwire max-toc-depth: 3 ---------------- [@signalwire/js]: https://www.npmjs.com/package/@signalwire/js [SignalWire Client]: /docs/browser-sdk/v3/js/reference/signalwire/client [Authentication]: /docs/browser-sdk/v3/js/reference/signalwire#authentication The SignalWire client enables the SignalWire's vision for Programmable Unified Communications. It allows a new paradigm in communications, designed to streamline usage and development across all communication types. The following section details the mechanisms available in the SignalWire browser SDK [@signalwire/js][@signalwire/js] to take advantage of the unified communication architecture. ## **Installation** The SignalWire client is available in the SignalWire Browser SDK [@signalwire/js][@signalwire/js] versions `3.27.0` and later. If your project uses a package manager, the Browser SDK can be installed like so: ```bash npm2yarn npm install @signalwire/js ``` It is also available through our CDN and can be included directly into the `
` section of your webpage. ```html ``` Once installed, you can take advantage of the new capabilities that the SignalWire client enables by instantiating a [SignalWire Client][SignalWire Client], like so: ```js ``` The access token is received after the subscriber completes the OAuth2 flow and successfully logs in. Learn more at the [Authentication][Authentication] section further below. ## **Concepts** ### Resources Resources are the primary entities for communication within SignalWire. Resources include: `Subscribers SWML Scripts`, `SignalWire AI Agents`, `Video-Rooms`, `SIP Endpoints`, etc. ### Subscribers Subscribers represent the end-users within SignalWire. They are the endpoints of communication, capable of receiving or initiating calls, messages, and other forms of interaction. SignalWire allows subscribers to switch from one type of communication to another. For example, switching from a phone call into a video-room to a web-based video call. You can create Subscribers and Resources in the [Resource section](https://my.signalwire.com/resources) of your SignalWire Dashboard, or with a HTTP POST request: ```bash curl --location --request POST 'https://spacename.signalwire.com/api/fabric/subscribers' \ --user "project_id:api key" \ --header 'Content-Type: application/json' \ --data-raw '{ "email": "[the subscriber email]", "password": "[the subscriber password]" }' ``` ### Addresses Each resource and subscriber is uniquely identified by an addresses which can be called, sent messages to, or interacted with in some other way. The address is composed of two parts: "/`context`/`name`" * **Context**: A identifier that indicates in which context the resource is located. * **Name**: The name is the unique identifier for the resource. For example, the address for a Subscribers resource named Alice in the public context would be /public/Alice. ## **Authentication** As explained in the [Subscribers](#subscribers) section above, Subscribers represent the end-users within SignalWire, thus usually actions are performed on behalf of the subscriber. So, when using the SignalWire Client, you will need a Subscriber's token to authenticate your requests. Usually, that token is obtained when the subscriber logs in using the OAuth2 flow described further below. But your server applications can perform actions on behalf of the subscriber by using getting a token using the REST API. ### REST API Token Authentication You can obtain authentication tokens directly through the REST API. The following endpoints are available for token generation: