> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.littglobal.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.littglobal.com/_mcp/server.

# Sign In

POST TBD/api/v2/users/sign-in

This API endpoint authenticates the provided user credentials and returns comprehensive user information on successful authentication, including the API token and user details like username, type, status, user role, created date, personal information like gender, mobile number, country, and profile image.

### Request Body

- `username` (string): The username of the account.
    
- `password` (string): The password for the account.
    
- `device_token` (string): Token of the device used.
    
- `device_token_type` (string): The type of device token.
    
- `device_type` (string): The type of device.
    
- `login_type` (string): The type of login. (e.g., local, OAuth)
    
- `referral_id` (string): The referral id if any.
    

### Response

- `user_id` (string): The unique identifier of the user.
    
- `name` (string): The full name of the user.
    
- `username` (string): The username of the user.
    
- `email` (string): The email address of the user.
    
- `api_token` (string): The API token for further API calls.
    
- `type` (string): The type of the user (public or private).
    
- `autoplay` (integer): Indicator to determine whether the autoplay feature is turned on.
    
- `is_vip` (integer): Indicates whether the user is a VIP (1) or not (0).
    
- `is_local_hero` (integer): Indicates whether the user is a local hero (1) or not (0).
    
- `is_investor` (integer): Indicates whether the user is an investor (1) or not (0).
    
- `merchant` (string): The merchant status of the user.
    
- `login_type` (string): The method used by the user for login.
    
- `created_at` (string): The time the user account was created.
    
- `wallet_balance` (string): The balance in the user's wallet.
    
- `loyalty_cash` (string): The amount of loyalty cash the user has.
    
- `reward_point_balance` (string): The number of reward points the user has.
    
- `is_litt` (integer): Indicates whether the user is a 'Litt' user (1) or not (0).
    
- `flags` (string): Any flags associated with the user account.
    
- `status` (integer): The current status of the user.
    
- `verification_token` (string): Phone/email verification token, can be null, if not requested.
    
- `otp_code` (string): OTP code for the application, can be null, if not requested.
    
- `dob` (string): The date of birth of the user.
    
- `age` (integer): The age of the user.
    
- `gender` (string): The gender of the user.
    
- `mobile_country_code` (string): The country code associated with the user's mobile number.
    
- `mobile_number` (string): The user's mobile number.
    
- `is_mobile_number_verified` (integer): Indicates whether the user's mobile number is verified (1) or not (0).
    
- `currency_id` (integer): The identifier of the currency used by the user.
    
- `user_agent` (string): Details about the web browser used by the user.
    
- `last_active` (string): The timestamp of the user's last activity.
    
- `last_in_app_otp` (string): The last in-app OTP generated for the user.
    
- `updated_at` (string): The timestamp of the latest update to the user's account.
    
- `img_id` (string): The identifier of the user's profile image.
    
- `profile_version` (string): The version of the user's profile.
    
- `country_selected` (string): Indicates whether the user has selected a country (1) or not (0).
    
- `country_id` (integer): The identifier of the country selected by the user.
    
- `country_name` (string): The name of the country selected by the user.
    
- `profile_image` (string): The URL of the user's profile image.
    
- `user_qrcode` (string): The URL to generate the user's QR code.
    
- `bio` (string): The bio of the user.
    
- `user_image` (string): The URL of the user's image.
    
- `has_visa` (integer): Indicates whether the user has a VISA card (1) or not (0).
    
- `referral_code` (string): The user's referral code.

Reference: https://docs.littglobal.com/litt-white-label/api-reference/authentication/sign-in

## Request

### Query parameters

- `api_token` (string, optional)

## Response

### 200

Sign In

- `message` (string, optional)
- `api` (string, optional)
- `status` (string, optional)
- `data` (ApiV2UsersSignInPostResponsesContentApplicationJsonSchemaData, optional)

## Types

### ApiV2UsersSignInPostResponsesContentApplicationJsonSchemaData

- `user_id` (string, optional)
- `name` (string, optional)
- `username` (string, optional)
- `email` (string, optional)
- `api_token` (string, optional)
- `type` (string, optional)
- `autoplay` (integer, optional)
- `is_vip` (integer, optional)
- `is_local_hero` (integer, optional)
- `is_investor` (integer, optional)
- `merchant` (string, optional)
- `login_type` (string, optional)
- `created_at` (string, optional)
- `wallet_balance` (string, optional)
- `loyalty_cash` (string, optional)
- `reward_point_balance` (string, optional)
- `is_litt` (integer, optional)
- `flags` (string, optional)
- `status` (integer, optional)
- `verification_token` (any, optional, nullable)
- `otp_code` (any, optional, nullable)
- `dob` (string, optional)
- `age` (integer, optional)
- `gender` (string, optional)
- `mobile_country_code` (string, optional)
- `mobile_number` (string, optional)
- `is_mobile_number_verified` (integer, optional)
- `currency_id` (integer, optional)
- `user_agent` (any, optional, nullable)
- `last_active` (string, optional)
- `last_in_app_otp` (any, optional, nullable)
- `updated_at` (string, optional)
- `img_id` (any, optional, nullable)
- `profile_version` (string, optional)
- `country_selected` (string, optional)
- `country_id` (integer, optional)
- `country_name` (string, optional)
- `profile_image` (string, optional)
- `user_qrcode` (string, optional)
- `bio` (string, optional)
- `user_image` (string, optional)
- `has_visa` (integer, optional)
- `referral_code` (string, optional)

## Examples

**Response**

```json
{
  "message": "You have successfully log in",
  "api": "api",
  "status": "success",
  "data": {
    "user_id": "6c68dd44-a4b8-400b-b4f5-89c1802d5c28",
    "name": "",
    "username": "kokofoot",
    "email": "",
    "api_token": "YOUR_API_TOKEN",
    "type": "public",
    "autoplay": 1,
    "is_vip": 0,
    "is_local_hero": 0,
    "is_investor": 0,
    "merchant": "0",
    "login_type": "local",
    "created_at": "2024-03-12 09:13:03",
    "wallet_balance": "0.00",
    "loyalty_cash": "0.00",
    "reward_point_balance": "0",
    "is_litt": 0,
    "flags": "",
    "status": 1,
    "verification_token": null,
    "otp_code": null,
    "dob": "",
    "age": 13,
    "gender": "prefer not to say",
    "mobile_country_code": "61",
    "mobile_number": "0400000000",
    "is_mobile_number_verified": 1,
    "currency_id": 1,
    "user_agent": null,
    "last_active": "2024-04-28 21:31:21",
    "last_in_app_otp": null,
    "updated_at": "2024-04-28 21:31:31",
    "img_id": null,
    "profile_version": "",
    "country_selected": "1",
    "country_id": 14,
    "country_name": "Australia",
    "profile_image": "",
    "user_qrcode": "https://api.qrserver.com/v1/create-qr-code/?size=185x185&ecc=L&qzone=1&data=http%3A%2F%2Fwww.example2.org",
    "bio": "",
    "user_image": "https://litt-ap-southeast-2-dev.s3-ap-southeast-2.amazonaws.com/1353513e-28db-4c21-b022-3126cc25c830/profile/placeholder_profile_image.png",
    "has_visa": 0,
    "referral_code": "ZK3FU0"
  }
}
```

**SDK Code**

```python Authentication_signIn_example
import requests

url = "https://tbd/api/v2/users/sign-in"

querystring = {"api_token":"{{token}}"}

response = requests.post(url, params=querystring)

print(response.json())
```

```javascript Authentication_signIn_example
const url = 'https://tbd/api/v2/users/sign-in?api_token=%7B%7Btoken%7D%7D';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Authentication_signIn_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://tbd/api/v2/users/sign-in?api_token=%7B%7Btoken%7D%7D"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Authentication_signIn_example
require 'uri'
require 'net/http'

url = URI("https://tbd/api/v2/users/sign-in?api_token=%7B%7Btoken%7D%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java Authentication_signIn_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tbd/api/v2/users/sign-in?api_token=%7B%7Btoken%7D%7D")
  .asString();
```

```php Authentication_signIn_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tbd/api/v2/users/sign-in?api_token=%7B%7Btoken%7D%7D');

echo $response->getBody();
```

```csharp Authentication_signIn_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/users/sign-in?api_token=%7B%7Btoken%7D%7D");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Authentication_signIn_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://tbd/api/v2/users/sign-in?api_token=%7B%7Btoken%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```