# Intro

#### Welcome to the Pulsoid API documentation.

Pulsoid enables real-time heart rate data transmission from the peripherals(like BLE heart rate monitors, smartwatches, etc) to the **Client**s. Pulsoid API allows reading real-time heart rate data.

**User**s - are real people who stream their heart rate data via Pulsoid.

**Client**s - are applications that want to read Pulsoid users' data. The developer should create client credentials at [pulsoid.net/ui/api-clients](https://pulsoid.net/ui/api-clients). Received client credentials include client\_secret which should be stored securely and never shared.

To consumer Pulsoid API, the developer should obtain an **authorization token**. **An authorization token** is used in every API call. Obtaining the token can be challenging but we are [here](https://discord.com/invite/g9Y4Bp7YYz) to help you :).

#### How to Obtain an Authorization Token

* **For Personal Use**: [Manual Token Issuing](https://docs.pulsoid.net/access-token-management/manual-token-issuing) is suitable and client credentials are not needed.
* **For Websites**: The [Implicit Grant](https://docs.pulsoid.net/access-token-management/oauth2-implicit-grant) is suitable.
* **For Desktop Applications**: If handling deep links, the [Implicit Grant](https://docs.pulsoid.net/access-token-management/oauth2-implicit-grant) is suitable.
* **For Backend Servers**: The [Authorization Code Grant](https://docs.pulsoid.net/access-token-management/oauth2-authorization-code-grant) is recommended.
* **For Plugins or Desktop Applications**: Use [OAuth 2 Device Authorization Flow](https://docs.pulsoid.net/access-token-management/oauth-2-device-authorization-flow).
* **For Plugins or Desktop Applications**: In case [OAuth 2 Device Authorization Flow](https://docs.pulsoid.net/access-token-management/oauth-2-device-authorization-flow) .
* **For Enterprise Applications**: To use Pulsoid for real-time heart rate data, contact us at <support@pulsoid.net> or on [Discord](https://discord.gg/tZktPS5).
* If you still have questions, ask them via <support@pulsoid.net> or on [Discord](https://discord.gg/tZktPS5).

#### JavaScript / TypeScript

If you are building a JavaScript or TypeScript application, use the official [`@pulsoid/socket`](https://www.npmjs.com/package/@pulsoid/socket) library for real-time heart rate streaming. It handles WebSocket connections, auto-reconnection, and provides full TypeScript support with zero dependencies.

```bash
npm install @pulsoid/socket
```

```javascript
import PulsoidSocket from '@pulsoid/socket';

const socket = PulsoidSocket.create('YOUR_TOKEN');

socket.on('heart-rate', (data) => {
  console.log(`${data.heartRate} BPM`);
});

await socket.connect();
```

See the [GitHub repository](https://github.com/pulsoid-oss/pulsoid-socket) for full documentation.

#### Recap

So, to integrate with Pulsoid you need to:

1. Create client credentials at [pulsoid.net/ui/api-clients](https://pulsoid.net/ui/api-clients)
2. Decide, what way of obtaining tokens is suitable for you
3. Use the API

#### FAQ


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pulsoid.net/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
