The user has to be logged in to proceed with this flow.Make sure to either:
- Send a valid
Authorization header with of type Bearer TOKEN_VALUE where TOKEN_VALUE is the token returned in the response from Sign up or Sign in flow
- In case your app supports cookie, you can enable request cookies as our API Automatically sets a cookie named
session-token which is forwarded with each request to our api.
In order to fetch the user information, the below endpoint can be used
curl --request GET \
--url https://dev-iam.razi.ai/v1/authentication/users/__USERID__ \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'X-App-Name: '
In order to get the metadata you must pass query param ?includeMetadata=true
This API call will return a 200 OK with below response:
{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+971111111111",
"metadata": {
"key": "value"
},
"email": "[email protected]",
"isEmailVerified": true,
"isPhoneVerified": true,
"userState": "ACTIVE",
"displayName": "John Doe"
}