Authentication
M2M Auth
To whitelist your domain and avoid CORS issues, follow the steps in Configuring Allowed Domains (CORS)
Authenticates a machine-to-machine client using Basic Authentication and returns an access token. The Basic Auth value should be constructed as: Base64(clientId:clientSecret)
No request body is required. Credentials are passed only in the Authorization header.
Basic authentication header. Format: "Basic " + Base64(clientId:clientSecret)
Basic dXNlcm5hbWU6cGFzc3dvcmQ=Token generated successfully
JWT token for authentication
eyJhbGciOiJIUzI1NiIsInR5cC.......Token expiration timestamp in ISO 8601 format
2024-10-22T18:40:54.908ZBad request
Unauthorized
Forbidden
POST /v1/m2m/token HTTP/1.1
Host: api.multiset.ai
Authorization: text
Accept: */*
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cC.......",
"expiresOn": "2024-10-22T18:40:54.908Z"
}Code Examples
Browser (JavaScript)
For client-side applications like WebXR, you can generate tokens directly in the browser:
Browser-based authentication exposes your credentials in client-side code. This is suitable for prototyping and demos, but for production applications consider using a backend proxy to keep credentials secure.
Node.js (Backend)
For server-side applications:
Last updated
Was this helpful?

