Authentication
Bearer token: Bearer <admin_token>
This endpoint requires admin privileges.
Path Parameters
The user’s profile ID (UUID)
Example Request
curl -X POST https://api.sari-platform.com/api/profiles/550e8400-e29b-41d4-a716-446655440000/approve \
-H "Authorization: Bearer <admin_token>"
Response
Generated client identifier for API access
Generated API secret (only shown once!)
Example Response
{
"message": "User approved successfully",
"client_id": "client_abc123def456",
"client_secret": "base64-url-safe-secret-32-chars"
}
The client_secret is only returned once and cannot be retrieved later. Store it securely.
What Happens
- Credentials Generated - A unique
client_id and client_secret are created
- Secret Hashed - The secret is hashed with bcrypt before storage
- Status Updated - Profile status changes to
approved
- Email Sent - Credentials are emailed to the user via Resend
Errors
| Status | Description |
|---|
| 401 | Invalid or expired token |
| 403 | Admin access required |
| 404 | User not found |
| 409 | User already approved or rejected |