> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Check account

> Get profile data for your own account or for another number / LID

**Auth:** `TokenAccount` or `TokenInstance` • **Rate limit:** `Global` (100/min) • **Idempotent:** yes (read-only)

## Description

Returns profile data for the connected account itself (picture, name, status, JID, LID). Optionally, looks up the profile of **another number** via `?number=`. Without the parameter, returns the profile of the instance itself.

## Examples

### Own account

Without the query parameter: returns the profile of the connected instance itself (picture, name, status, JID, and LID). A direct way to verify who is connected to that session.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://ryzeapi.cloud/api/profile/getAccount/$Instance_Name" \
    -H "token: $Token_Instance"
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/profile/getAccount/${process.env.Instance_Name}`, {
    method: "GET",
    headers: {
      "token": process.env.Token_Instance
    }
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.get(
      f"https://ryzeapi.cloud/api/profile/getAccount/{os.environ['Instance_Name']}",
      headers={
          "token": os.environ["Token_Instance"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/profile/getAccount/"+os.Getenv("Instance_Name"), nil)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Another number

Looks up the public profile of a third party by number (`?number=5511988887777`). Useful for verifying that the number exists on WhatsApp and getting their publicly visible picture / name / status.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://ryzeapi.cloud/api/profile/getAccount/$Instance_Name?number=5511988887777" \
    -H "token: $Token_Instance"
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/profile/getAccount/${process.env.Instance_Name}?number=5511988887777`, {
    method: "GET",
    headers: {
      "token": process.env.Token_Instance
    }
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.get(
      f"https://ryzeapi.cloud/api/profile/getAccount/{os.environ['Instance_Name']}?number=5511988887777",
      headers={
          "token": os.environ["Token_Instance"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/profile/getAccount/"+os.Getenv("Instance_Name")+"?number=5511988887777", nil)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### By LID

Looks up the profile using a LID (`@lid`) instead of a number. Useful when the source event only exposes the anonymous LID (in newer WhatsApp communities / channels), without the corresponding phone number.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://ryzeapi.cloud/api/profile/getAccount/$Instance_Name?number=52399087550579@lid" \
    -H "token: $Token_Instance"
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/profile/getAccount/${process.env.Instance_Name}?number=52399087550579@lid`, {
    method: "GET",
    headers: {
      "token": process.env.Token_Instance
    }
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.get(
      f"https://ryzeapi.cloud/api/profile/getAccount/{os.environ['Instance_Name']}?number=52399087550579@lid",
      headers={
          "token": os.environ["Token_Instance"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/profile/getAccount/"+os.Getenv("Instance_Name")+"?number=52399087550579@lid", nil)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

Returns `profile` with the target's data: `profilePicture` (WhatsApp CDN URL, **always** present, becomes `null` if the account has no picture or the lookup timed out), `profileName` (push name or business name), `profileStatus` ("About" text), `phoneNumber` (digits only), `jid` (`<number>@s.whatsapp.net`), and `lid` (`@lid` format, when available). All fields except `profilePicture` use `omitempty` and may not appear if WhatsApp didn't return that data.

```json 200 OK theme={null}
{
  "success": true,
  "message": "Profile information retrieved successfully",
  "profile": {
    "profilePicture": "https://pps.whatsapp.net/...",
    "profileName": "João Silva",
    "profileStatus": "Disponível",
    "phoneNumber": "5511999999999",
    "jid": "5511999999999@s.whatsapp.net",
    "lid": "199789077627112@lid"
  }
}
```

```json 200 OK (no picture) theme={null}
{
  "success": true,
  "message": "Profile information retrieved successfully",
  "profile": {
    "profilePicture": null,
    "profileName": "Cliente Teste",
    "phoneNumber": "5511988887777",
    "jid": "5511988887777@s.whatsapp.net"
  }
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name.
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  `TokenAccount` or `TokenInstance`.
</ParamField>

## Query

<ParamField query="number" type="string">
  Number (`5511999999999`, `+5511999999999`, `5511999999999@s.whatsapp.net`) or LID (`52399087550579@lid`). If omitted, returns the profile of the instance itself.
</ParamField>

## Notes

<Note>
  * For BR numbers (`55...`), the service automatically tries variations with and without the 9th digit.
  * Automatic sanitization of `+`, `-`, `(`, `)`, and spaces: `(11) 99999-9999` becomes `11999999999`.
  * `profilePicture` is the only field that always appears (may be `null`); the others use `omitempty`.
  * The picture URL is temporary (WhatsApp CDN). If the lookup exceeds 10s, the field comes back `null`.
  * For your own account, prefer `number=""`, passing your own number returns data "as others see you".
</Note>

## Errors

| HTTP | Message                                          |
| ---- | ------------------------------------------------ |
| 400  | `Number not found or not registered on WhatsApp` |
| 400  | `invalid LID format`                             |
| 400  | `Instance is not connected to WhatsApp`          |
| 500  | `timeout ao buscar foto (>10s)`                  |

Envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "Number not found or not registered on WhatsApp" }
}
```
