Fetch current user

How to retrieve data of the user making API Calls

To retrieve information about the user holding the API token used, you should use the following query:

query {
  me {
    id
    name
    email
    phone
    cpf
    cnpj
    birthday
    subscription {
      has_premium_features
      documents
      credits
    }
    organization {
      id
      uuid
      name
      cnpj
    }
  }
}

This is an example of a request you can make, and you can choose which data you want to receive or not. A more detailed documentation about all possible fields is available in Altairarrow-up-right.

Expected respose

circle-info

You can check what each of these parameters means directly in the full GraphQL API documentation, available in the Docs menu of Altairarrow-up-right. If you're unsure how to do this, check out our tutorial on Using Altair.

circle-info

If Altair doesn’t help you integrate with the API, here are some examples of how to make these requests in other ways: https://graphql.org/graphql-js/graphql-clients/arrow-up-right

Last updated