---
description: Retrieve information related to player's account balances, chips, and more.
---

# Profile API

## Overview

The **Profile  API** allows clients to retrieve player data from Pokerscript, including profile information and chip balance.

## **Endpoint**

`GET http://admin.pokerurl.com/api/profile`

## Headers

| Key             | Value                | Description                        |
| --------------- | -------------------- | ---------------------------------- |
| `AuthKey`       | `489j4erwginerwgirn` | Client Key provided by Pokerscript |
| `Accept`        | `application/JSON`   | Expected response format           |
| `Content-Type`  | `application/JSON`   | Request payload format             |
| `Authorization` | `Bearer + UserToken` | User authentication token          |

## Request Body

The API requires the following JSON payload:

```json
{
  "username": "username",
  "Token": "UserToken",
  "email": "support@pokerscript.net"
}
```

**Note:** The `UserToken` is retrieved from the Login API and should be securely stored on the client side (local machine or database) for easy access.

## Success Response

On successful retrieval, the API returns a **200 OK** response with the following JSON format:

```json
{
  "status": true,
  "message": "Profile Details Fetch Successfully.",
  "data": {
    "playerId": "607c7db76a40702ba15cfb4a",
    "email": "support@pokerscript.net",
    "username": "username",
    "firstname": "first",
    "lastname": "last",
    "avatar": "doraemon.png",
    "chips": 100.00,
    "hour_balance": "10:00",
    "is_able": true,
    "mobile": +19177649944,
    "isCash": true,
    "language": "en",
    "country": "US",
    "vipLevel": 2
  }
}
```

## Error Responses

If the request fails, an error response is returned with the corresponding status code:

#### `401 Unauthorized`

```
{
    "status": false,
    "message": "Invalid Authorization Token"
}
```

#### `404 Not Found`

```
{
    "status": false,
    "message": "User Not Found"
}
```

#### `500 Internal Server Error`

```
{
    "status": false,
    "message": "Something Went Wrong"
}
```

## Additional Notes

* Ensure that the `UserToken` is valid and has not expired.
* If an authentication error occurs, verify that the correct `AuthKey` and `UserToken` are used.
* The API response times depend on server load; retry if necessary in case of a temporary failure.
