Authentication
Verify OTP code
POST
/api/auth/otp/verifySDK setup
Create a client instance. No authentication is required for this endpoint.
import { Configuration, AuthenticationApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const authentication = new AuthenticationApi(configuration);import { Configuration, AuthenticationApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const authentication = new AuthenticationApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await authentication.verifyOTP(
{
identifier: "pixel compress",
otp: "transmitter synthesize",
projectId: "proj_P9aIXVPcMaDL"
}
);const { data: result } = await authentication.verifyOTP(
{
identifier: "pixel compress",
otp: "transmitter synthesize",
projectId: "proj_P9aIXVPcMaDL"
}
);Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
No Request Yet
Send a request to see the full inspector
Authentication
Public — No Auth Required
Request Body
json
{
"identifier": "protocol copy",
"otp": "microchip connect",
"projectId": "proj_qh5hFHNT70YZ"
}{
"identifier": "protocol copy",
"otp": "microchip connect",
"projectId": "proj_qh5hFHNT70YZ"
}Responses
200OTP verified
json
{
"message": "OTP verified successfully",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 1800,
"user": {
"_id": "685acbe0e129932fbb7a0fc2",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe"
}
}{
"message": "OTP verified successfully",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 1800,
"user": {
"_id": "685acbe0e129932fbb7a0fc2",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe"
}
}