cURL
curl --request GET \ --url https://faisalshop.mvp-apps.ae/api/v2/admin/who_am_i \ --header 'Authorization: Bearer <token>'
{ "user": { "id": 123, "name": "<string>", "email": "[email protected]", "user_type": "<string>", "is_active": "<string>", "created_at": "2023-11-07T05:31:56Z" }, "tenants": [ { "id": 123, "name": "<string>", "role": "ADMIN", "is_active": true } ] }
curl -X GET \ https://faisalshop.mvp-apps.ae/api/v2/admin/who_am_i \ -H 'Authorization: Bearer YOUR_TOKEN'
const response = await axios.get( '/api/v2/admin/who_am_i', { headers: { Authorization: `Bearer ${token}` } } ); console.log('User:', response.data.user); console.log('Tenants:', response.data.tenants);
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
User information with tenants
Show child attributes
ADMIN
MEMBER