AUTH API Reference
Complete API documentation for Authentication.
Quick Start
Authentication
Choose authentication based on your use case:
User-Connected Apps (De.auth):
http
de-auth-token: YOUR_AUTH_TOKEN
de-user-agent: YOUR_USER_AGENT
de-auth-service: YOUR_SERVICE_NAMEServer-to-Server / Connectors:
http
Authorization: Bearer <ACCESS_TOKEN>Base URL
https://auth.dedot.io/v1/authAPI Categories
Utilities
1 endpoint available
- POST Upload Avatar -
/v1/upload/avatar
General Authentication
6 endpoints available
- POST Sign In -
/v1/signin - POST Phone Number Verification -
/v1/verification - POST Set Account -
/v1/set-account - PUT Change Phone Number -
/v1/change-phone - POST Resend Verification SMS -
/v1/resend/sms - GET Sign Out -
/v1/signout
Sign In
http
POST /v1/signin
Content-Type: application/json
de-user-agent: Mobile App v1.0
de-auth-service: MyService
{
"phone": "+1234567890",
"device": {
"platform": "iOS",
"model": "iPhone 13"
},
"country": {
"code": "US",
"name": "United States",
"ip": "192.168.1.1"
}
}Response:
json
{
"error": false,
"status": "AUTH::UPN_SIGNIN",
"message": "A phone number verification code is sent to user via sms",
"next": "verify"
}Phone Number Verification
http
POST /v1/verification
Content-Type: application/json
de-user-agent: Mobile App v1.0
de-auth-service: MyService
{
"phone": "+1234567890",
"pvc": 123456
}Response for New User:
json
{
"error": false,
"status": "AUTH::PVC_VERIFIED",
"next": "create-account"
}Response for Existing User:
json
{
"error": false,
"status": "AUTH::SUCCEED",
"next": "grantaccess",
"ctoken": "ENCODED_CONNECTION_TOKEN",
"deviceId": "DEVICE_IDENTIFIER"
}Set Account
http
POST /v1/set-account
Content-Type: application/json
de-user-agent: Mobile App v1.0
de-auth-service: MyService
{
"phone": "+1234567890",
"firstName": "John",
"lastName": "Doe",
"agreeTerms": true,
"type": "PERSONAL",
"photo": "base64_encoded_image_data",
"newsletters": true,
"country": {
"code": "US",
"name": "United States"
},
"device": {
"platform": "iOS",
"model": "iPhone 13"
}
}Response:
json
{
"error": false,
"status": "AUTH::SUCCEED",
"next": "grantaccess",
"ctoken": "ENCODED_CONNECTION_TOKEN",
"deviceId": "DEVICE_IDENTIFIER"
}Change Phone Number
http
PUT /v1/change-phone
Content-Type: application/json
de-user-agent: Mobile App v1.0
de-auth-service: MyService
{
"phone": "+1234567890",
"new_phone": "+0987654321",
"country": {
"code": "US",
"name": "United States"
}
}Response:
json
{
"error": false,
"status": "AUTH::UPN_SIGNIN",
"message": "A phone number verification code is sent to user via sms",
"next": "verify"
}Resend Verification SMS
http
POST /v1/resend/sms
Content-Type: application/json
de-user-agent: Mobile App v1.0
de-auth-service: MyService
{
"phone": "+1234567890"
}Response:
json
{
"error": false,
"status": "AUTH::PVC_SENT",
"message": "SMS resent",
"delay": 120
}Sign Out
http
GET /v1/signout?allDevices=false
Content-Type: application/json
de-auth-token: YOUR_AUTH_TOKEN
de-user-agent: Mobile App v1.0
de-auth-service: MyServiceResponse:
json
{
"error": false,
"status": "AUTH::SIGNED_OUT",
"message": "Signed Out",
"next": "signin"
}Response Format
All API responses follow this structure:
typescript
interface APIResponse<T> {
error: boolean;
status: string;
message?: string;
data?: T;
}Success Response
json
{
"error": false,
"status": "SUCCESS",
"data": { ... }
}Error Response
json
{
"error": true,
"status": "ERROR_CODE",
"message": "Human-readable error message"
}Common Error Codes
| Status Code | Description |
|---|---|
SUCCESS | Request completed successfully |
NOT_FOUND | Resource not found (404) |
UNAUTHORIZED | Authentication failed (401) |
FORBIDDEN | Insufficient permissions (403) |
VALIDATION_ERROR | Invalid request data (400) |
INTERNAL_ERROR | Server error (500) |
Rate Limits
Standard Rate Limits:
- 1000 requests per hour
- 100 requests per minute (burst)
Rate limit headers:
http
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200When rate limit is exceeded, you'll receive a 429 Too Many Requests response.
Pagination
List endpoints support pagination:
http
GET /v1/auth/resource?page=1&limit=50Response includes pagination metadata:
json
{
"error": false,
"status": "SUCCESS",
"data": [...],
"pagination": {
"page": 1,
"limit": 50,
"total": 237,
"pages": 5
}
}Helpful Resources
Need help? Check our Developer Portal or contact support.

