Username Registration
API usage for username & password registration method.
⚠️
This username/password endpoint is deprecated. Please use the custody authentication method instead.
Overview
This API endpoint allows you to register a new account in your Xellar Embedded wallet using a username and password.
- HTTP Method: POST
- Endpoint:
/api/<VERSION>/auth/register
Request Body Parameters
username(required): The username to register.password(required): The password for the new user.
Example Request Body
{
"username": "j.doe",
"password": "StrongPassword123!"
}Request
Request Headers
x-client-secret(required if x-app-id is empty): Client Secret which was generated when create an app in Xellar Dashboard.x-app-id(required if x-client-secret is empty): App Id which was generated when create an app in Xellar Dashboard. (You need to add your origin in Xellar Dashboard if using x-app-id)
Example Request Syntax
Response
The response will include a JSON object with the following properties:
status(number): The HTTP status code of the response (e.g., 200 for success).message(string): A message providing additional information about the operation.data(object): An object containing the accessTokendata.accessToken(string): The token used for accessing account operations.
Example Response
{
"status": 200,
"message": "ok",
"data": {
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6....."
}
}