Login User
Login a user with the email address and password provided during sign-up.
User Authentication Request
cURL
POST- /workspaces/:workspaceSlug/databases/:databaseName/users/login
curl 'https://api.thenile.dev/workspaces/<string>/databases/<string>/users/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "<string>",
"password": "<string>"
}'
The response will include the user id, tenant list, and token with metadata.
User Authentication Response
200
{
"id": "018b6216-27a1-7e2b-aa83-67d7ba500982",
"tenants": [
"018b61ec-af9e-77e5-b27f-77239cd4a0bc"
],
"token": {
"jwt": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RoZW5pbGUuZGV2IiwiYXVkIjpbImRhdGFiYXNlOjAxOGI2MWJjLWNmMmMtNzM5Mi05MmE2LWYxYTgxMWNmNDQxOSIsIm5pbGUiXSwiaWF0IjoxNjk4MTU5MDQ0LCJleHAiOjE2OTgxNjI2NDQsInN1YiI6IjAxOGI2MjE2LTI3YTEtN2UyYi1hYTgzLTY3ZDdiYTUwMDk4MiIsImp0aSI6IjkxN2I1MDA1LTRjNWEtNDdiYy1hNDE5LTc4M2Y5MzI5ZTdkMyIsIm5hbWUiOiJwc2NrYXVnaHQiLCJlbWFpbCI6InNjb3R0aWN1c0Btc24uY29tIiwic2NvcGUiOiJkYXNoYm9hcmQifQ.jxtxzgi6N66OXaeEZwjH4i_wIxvGDak4iAh4XHICzdtQYKnqc4tvBmQ3xxyjvy_u_wmwOMdw_YJlqGwiWVL5TJyyVuHTBV8z-EuXxV-rIMR7OPMRTY6PfQ7r0d_ivUoTY1uX4FLvNdj2cNP6z_VczWGwKdMQ04UJ4jNSD-eVpLOF-bjd0_w9huOaMyepK8SFURGKpdZe5qKS8ahl4W7kOKbJHonQ8SVKI8Xr0Rp3gLM4B2PjkUZL0ImICxlLcpz3q0PdL54nEU8iGFnlSrppAD5VzYK1H9Wfa9ycGDkSWGP4IejD7hHX3xAv-M8Uo1n2W-Pw4hECHkWInNHtmlRQZw",
"maxAge": 3600,
"type": "ACCESS_TOKEN"
}
}