Authentication

This API allows you to retrieve the authenticated user's information by providing the API key.

Endpoint

GET https://zap.pandaidx.com/api/me?api_key={{api_key}}

See guidelines on how to generate or obtain your API Key

Authentication

You must provide an API key as a query parameter to authenticate the request. The key is used to identify and authorize the user making the request.

Query Parameters

  • api_key (required): The API key for authenticating the request. You can obtain this from the Panda IDX dashboard.

Request Examples

cURL
js
py
# Example Request using cURL
curl -X GET "https://zap.pandaidx.com/api/me?api_key=your_api_key_here"

Response

The API returns a JSON object containing the authenticated user's information. The token is not included, but the user's account details are returned.

Response Fields

FieldTypeDescription
_idStringThe unique identifier of the authenticated user.
emailStringThe email address of the authenticated user.
nameStringThe full name of the authenticated user.
roleStringThe role of the authenticated user (e.g., user, admin).
createdAtStringThe date and time when the user was created (ISO 8601 format).
updatedAtStringThe date and time when the user's information was last updated.
domainStringThe domain associated with the authenticated user.

Example Response

{
  "_id": "66955f1f93c1be2dd9deb221",
  "email": "user@example.com",
  "name": "John Doe",
  "role": "user",
  "createdAt": "2023-09-12T12:34:56Z",
  "updatedAt": "2023-09-15T12:34:56Z",
  "domain": "12345"
}

Errors

In the case of an error, the API will return an appropriate HTTP status code and an error message.

Error Codes

HTTP CodeError TypeDescription
401UnauthorizedThe API key is invalid or missing.
500ServerErrorAn internal server error occurred.

Example Error Response

{
  "error": "Unauthorized",
  "message": "Invalid API key"
}

Notes

  • Ensure that the API key provided is valid and belongs to an authenticated user.