curl --request POST \
--url https://api.example.com/api/register \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"email": "<string>",
"password": "<string>",
"avatar_url": "<string>",
"description": "<string>"
}
'{
"message": "<string>",
"error": "<string>"
}Create a new user account with username, email, and password
curl --request POST \
--url https://api.example.com/api/register \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"email": "<string>",
"password": "<string>",
"avatar_url": "<string>",
"description": "<string>"
}
'{
"message": "<string>",
"error": "<string>"
}"I can't see a single field you filled" - Missing required fields (username, email, or password)"You are talking too much in the description" - Description exceeds 500 words" the user already exists" - Username or email already registeredcurl -X POST https://api.mirage.com/api/register \
-H "Content-Type: application/json" \
-d '{
"username": "johndoe",
"email": "[email protected]",
"password": "securepassword123",
"avatar_url": "https://example.com/avatar.jpg",
"description": "Software developer and tech enthusiast"
}'
{
"message": "Welcome to MIRAGE"
}
generate_password_hash before storage