curl https://app.drime.cloud/api/v1/users/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://app.drime.cloud/api/v1/users/me', {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
console.log(data.user);
import requests
response = requests.get(
'https://app.drime.cloud/api/v1/users/me',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
print(response.json())
{
"user": {
"id": 15843,
"email": "user@example.com",
"display_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-15T10:30:00.000000Z"
},
"status": "success"
}
{
"message": "Authentication required."
}
User & Workspaces
Get Logged User
Get the account the token belongs to
GET
/
users
/
me
curl https://app.drime.cloud/api/v1/users/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://app.drime.cloud/api/v1/users/me', {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
console.log(data.user);
import requests
response = requests.get(
'https://app.drime.cloud/api/v1/users/me',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
print(response.json())
{
"user": {
"id": 15843,
"email": "user@example.com",
"display_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-15T10:30:00.000000Z"
},
"status": "success"
}
{
"message": "Authentication required."
}
Overview
Returns the account the token belongs to. Every token can call it, whatever its permissions or scopes, and an invalid or revoked token gets401.
Older examples used
GET /cli/loggedUser. Use /users/me instead: tokens with limited permissions are refused on the old route, and it does not answer 401 for a bad token.Response
object
string
successcurl https://app.drime.cloud/api/v1/users/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://app.drime.cloud/api/v1/users/me', {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
console.log(data.user);
import requests
response = requests.get(
'https://app.drime.cloud/api/v1/users/me',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
print(response.json())
{
"user": {
"id": 15843,
"email": "user@example.com",
"display_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-15T10:30:00.000000Z"
},
"status": "success"
}
{
"message": "Authentication required."
}