Get current user
client.users.retrieveCurrent(RequestOptionsoptions?): UserRetrieveCurrentResponse { name }
GET/v1/users/me
Get current user
import Chamelaion from 'chamelaion';
const client = new Chamelaion({
apiKey: process.env['CHAMELAION_API_KEY'], // This is the default and can be omitted
});
const response = await client.users.retrieveCurrent();
console.log(response.name);{
"name": "My API Token"
}{
"error": "missing authorization header"
}{
"error": "invalid authorization format"
}{
"error": "missing token"
}{
"error": "invalid token"
}{
"error": "unauthorized"
}{
"error": "internal error"
}Returns Examples
{
"name": "My API Token"
}{
"error": "missing authorization header"
}{
"error": "invalid authorization format"
}{
"error": "missing token"
}{
"error": "invalid token"
}{
"error": "unauthorized"
}{
"error": "internal error"
}