Skip to main content
GET
Get Basic User Information

Get Basic User Information

This endpoint retrieves basic profile information for the user associated with the provided access token.
WhatsApp Registration & Null Emails
Users who register via WhatsApp may not have an email address associated with their account initially. In such cases, the email field will be null.
Best Practice for Developers:
  1. Always check if the email field is null before using it.
  2. Use id or mubarokah_id (available in User Details) as the primary identifier in your database.
  3. Provide a fallback mechanism or prompt the user to complete their profile if an email is required by your application.

Authorization Headers

string
required
The Bearer token for authentication. Example: Bearer {YOUR_ACCESS_TOKEN}
string
default:"application/json"
Specifies the desired response format.

Required Scope

  • view-user
Your application must request the view-user scope during the OAuth authorization flow to access this endpoint. If the access token does not have this scope, a 403 Forbidden error will be returned.

Request Examples

JavaScript/Node.js

Python

PHP

cURL

Successful Response (200 OK)

A successful request returns a JSON object containing the user’s basic profile information. Response Fields:
number
required
The unique identifier for the user.
string
required
The full name of the user.
string
The primary email address of the user. Note: This field may be null if the user registered via WhatsApp and has not yet linked an email address.
string
URL to the user’s profile picture. May be null.
string
The user’s chosen username. Defaults to a unique string or null if not set.
string
The gender of the user (e.g., “male”, “female”, “other”). May be null.

Example Successful Response

Error Responses

Common Error Responses

Cause: Access token is missing, invalid, or expired.
Or for expired tokens:
Resolution: Refresh the access token or re-authenticate the user.

Rate Limiting

This endpoint is subject to rate limiting:
  • Limit: 100 requests per minute per access token
  • Reset: Rate limit resets every minute
  • Headers: Check X-RateLimit-Remaining and X-RateLimit-Reset response headers

Testing the Endpoint

Using the API Playground

You can test this endpoint directly using the API playground above. Make sure you have:
  1. A valid access token with view-user scope
  2. The token is not expired
  3. Your application is properly registered

Integration Testing Script

Refer to the general Error Codes section for more details on other possible errors.