Login
Authenticate a user with their credentials and return access tokens. This endpoint accepts email/phone and password combinations to verify user identity. Upon successful authentication, the system returns both access and refresh tokens for secure API access.
POST
Parameters
Body
application/jsonEmail
User's email address for authentication, must be a valid email format
Phone_number
User's phone number in E.164 international format (e.g., +12125551234) as an alternative authentication identifier
Password
User's account password for standard authentication
Otp
One-time password or verification code for multi-factor authentication or passwordless login
| Status code | Description |
|---|---|
| 200 | Successful login |
| 400 | Bad request error - the request contains invalid parameters or malformed data |
| 500 | Internal server error - an unexpected error occurred on the server |
cURL
curl -L -X POST \"https://blockv-labs.io/wallet/login" \-H 'Accept: application/json'
Response
{"wallet": {"id": "string","nickname": "string","email": "SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP","phone_number": "string","avatar": {"id": "string","name": "string","type": "string","url": "string","hash": "string","is_public": false,"when_created": "2024-01-01T00:00:00Z"},"language": "en","fqdn": "string","activated": false,"disabled": false,"account": {"address": "SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP","public_key": "string","type": "ED25519"},"onboarding": false,"when_created": "2024-01-01T00:00:00Z","when_modified": "2024-01-01T00:00:00Z"},"access_token": "string","refresh_token": "string"}
json
{"type": "object","required": ["wallet","access_token","refresh_token"],"properties": {"wallet": {"description": "User's wallet information returned after successful authentication","type": "object","required": ["id","fqdn","language","activated","disabled","account","when_created","when_modified"],"properties": {"id": {"type": "string","description": "Unique identifier for the user/account"},"nickname": {"type": "string","description": "User's preferred display name or alias","x-go-type-skip-optional-pointer": true},"email": {"type": "string","description": "User's email address for communications and account recovery","x-go-type-skip-optional-pointer": true},"phone_number": {"type": "string","description": "User's contact phone number, may be used for SMS verification or notifications","x-go-type-skip-optional-pointer": true},"avatar": {"type": "object","description": "Represents a file or media asset stored in the platform","required": ["id","url"],"properties": {"id": {"type": "string","description": "Unique identifier for the asset","x-oapi-codegen-extra-tags": {"bson": "id,omitempty"}},"name": {"type": "string","description": "Human-readable name of the asset","x-oapi-codegen-extra-tags": {"bson": "name,omitempty"}},"type": {"type": "string","description": "MIME type of the asset (e.g., image/jpeg, application/pdf)","x-oapi-codegen-extra-tags": {"bson": "type,omitempty"}},"url": {"type": "string","description": "Public URL where the asset can be accessed","x-oapi-codegen-extra-tags": {"bson": "url,omitempty"}},"hash": {"type": "string","description": "Cryptographic hash of the asset content for integrity verification","x-oapi-codegen-extra-tags": {"bson": "hash,omitempty"}},"is_public": {"type": "boolean","description": "Whether the asset is publicly accessible without authentication","x-oapi-codegen-extra-tags": {"bson": "is_public,omitempty"}},"when_created": {"type": "string","format": "date-time","description": "Timestamp when the asset was uploaded","x-oapi-codegen-extra-tags": {"bson": "when_created,omitempty"}}}},"language": {"description": "User's preferred language for the interface and communications","type": "string","enum": ["en","es","fr","de","it","pt","ru"],"x-oapi-codegen-extra-tags": {"bson": "language,omitempty","form": "language","validate": "omitempty,oneof=en es fr de it pt ru"}},"fqdn": {"type": "string","description": "Fully Qualified Domain Name associated with the user account"},"activated": {"type": "boolean","description": "Indicates whether the user has completed the activation process"},"disabled": {"type": "boolean","description": "Indicates whether the account has been disabled by an administrator or automated process"},"account": {"description": "Reference to the user's account wallet information","type": "object","required": ["address","public_key","type"],"properties": {"address": {"type": "string","description": "The public address of the account."},"public_key": {"type": "string","description": "The public key of the account."},"type": {"type": "string","description": "The type of the account.","enum": ["ED25519","SECP256K1"]}}},"onboarding": {"type": "boolean","description": "Indicates whether the user is in the onboarding process","x-go-type-skip-optional-pointer": true},"when_created": {"type": "string","format": "date-time","description": "Timestamp of when the user account was initially created"},"when_modified": {"type": "string","format": "date-time","description": "Timestamp of when the user account was last modified"}}},"access_token": {"type": "string","description": "JWT token used for authenticating subsequent API requests"},"refresh_token": {"type": "string","description": "Long-lived token used to obtain new access tokens without re-authentication"}}}