Body Required
-
email string(email)
-
password string
-
passwordConfirmation string
POST
/auth/register
curl \
-X POST https://wanhost-sandbox-api.onsplrge.live/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"hello@victor.kiwi","password":"secret","passwordConfirmation":"secret"}'
Request example
{
"email": "hello@victor.kiwi",
"password": "secret",
"passwordConfirmation": "secret"
}
Response examples (422)
[
{
"message": "The email has already been taken",
"rule": "database.unique",
"field": "email"
},
{
"message": "The passwordConfirmation field and password field must be the same",
"rule": "confirmed",
"field": "passwordConfirmation",
"meta": {
"otherField": "password"
}
}
]
Response examples (201)
{
"accessToken": {
"type": "bearer",
"name": "null",
"token": "whu_NDk.SlU2YXBCWkVfU0hmLThVWXR1WXZGeG0xd25SbkNCUm5VZ3hDWWZGUjQxNjc3NDczNjU",
"abilities": [
"*"
],
"lastUsedAt": "2024-03-06T09:34:59.403Z",
"expiresAt": "2024-03-06T09:34:59.403Z"
},
"refreshToken": {
"type": "bearer",
"name": "null",
"token": "whr_NTA.UmVhOHNmRXVFS1JuNklHYVhiU2cwUVMtank3UWQ2cmpGUHcyRWloVDE4MDUxODg5NjI",
"abilities": [
"*"
],
"lastUsedAt": "2024-03-06T09:34:59.403Z",
"expiresAt": "2024-03-06T09:34:59.403Z"
}
}