![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@magicbell/user-client
Advanced tools
Welcome to the Client SDK documentation. This guide will help you get started with integrating and using the Client SDK in your project.
2.0.0
0.2.0
OpenAPI 3.1.0 Specification for MagicBell API.
This SDK is compatible with the following versions: TypeScript >= 4.8.4
To get started with the SDK, we recommend installing using npm
:
npm install @magicbell/user-client
The Client API uses an Access Token for authentication.
This token must be provided to authenticate your requests to the API.
When you initialize the SDK, you can set the access token as follows:
const sdk = new Client({ token: 'YOUR_TOKEN' });
If you need to set or update the access token after initializing the SDK, you can use:
const sdk = new Client();
sdk.token = 'YOUR_TOKEN';
You can set a custom timeout for the SDK's HTTP requests as follows:
const client = new Client({ timeout: 10000 });
Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:
import { Client } from '@magicbell/user-client';
(async () => {
const client = new Client({
token: 'YOUR_TOKEN',
});
const { data } = await client.channels.getMobilePushApnsTokens({
pageSize: 6,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
console.log(data);
})();
The SDK provides various services to interact with the API.
Name |
---|
ChannelsService |
IntegrationsService |
The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
FAQs
OpenAPI 3.1.0 Specification for MagicBell API.
The npm package @magicbell/user-client receives a total of 2 weekly downloads. As such, @magicbell/user-client popularity was classified as not popular.
We found that @magicbell/user-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.