📄Get Current User
Get User Information
Params
Header Parameter ⬇️
Bearer {{access_token}} (required)
String
Provide Access Token for fetching User Account Details. Access Token is generated via the Submit OTP API endpoint.
Sample Access Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjgwMDI0MDIzLCJqdGkiOiI3NDQ0YWRjOS1lMDk4LTQ3YmEtOWYxZS04MmQ5MjgzMzAzMjYiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiRVFPS1NVIiwibmJmIjoxNjgwMDI0MDIzLCJleHAiOjE2ODAxOTY4MjN9.UWYCZXenkVS-SVgHlncOht-ckloNcPilUPoYAmH2Yfw.
Sample Request ⬇️️ (Header Parameter)
curl --location 'https://matar.in.ngrok.io/api/v1/get_current_user' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjgwMDI0MDIzLCJqdGkiOiI3NDQ0YWRjOS1lMDk4LTQ3YmEtOWYxZS04MmQ5MjgzMzAzMjYiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiRVFPS1NVIiwibmJmIjoxNjgwMDI0MDIzLCJleHAiOjE2ODAxOTY4MjN9.UWYCZXenkVS-SVgHlncOht-ckloNcPilUPoYAmH2Yfw'
Responses ⬇️
Status Code: 🟢200 (200 denotes 'ok')
{
"_id": "39501T",
"image_url": null,
"language": "hi-IN",
"name": "Sri",
"phone_number": "917254326789",
"roles": {
"default": [
"129487316"
]
}
}
Status Code: 🔴401 (401 denotes 'Unauthorized')
{
"description": "The token has expired.",
"error": "token_expired"
}
Response Parameters Description:
_id
User ID
image_url
User Profile Image URL or Avatar
language
Language in which the user has signed in. To see all language types check Get all Languages API Endpoint.
name
Name for the User Account
phone_number
Phone Number Linked to User Account
roles : default :
This contains the organization ID in which the User has joined. To see the list of all organizations by org ID check Get List of organizations API endpoint.
Last updated