> 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.

# Resend Username - SMS

POST TBD/api/v2/users/resend-username
Content-Type: application/json

The endpoint resends the username to a user who may have forgotten it. To initiate this process the user must provide their mobile number corresponding to the forgotten username, which must already exist in the application's database. Once the request is fulfilled, the username will be sent to the provided mobile number.

### Request Body

- `mobile_number` (String): The mobile number of the user in "0400000000" format.
    

### Response

The API endpoint does not produce a response body. After successful completion, the user will receive the username via SMS and the API will return an HTTP status code indicating success but not display a message.

Reference: https://docs.littglobal.com/litt-white-label/api-reference/authentication/resend-username-sms

## Request

### Body (application/json)

This endpoint expects an object.

- `api` (string, optional)
- `data` (ApiV2UsersResendUsernamePostRequestBodyContentApplicationJsonSchemaData, optional)

## Response

### 200

Resend Username - SMS

- `message` (string, optional)
- `api` (string, optional)
- `status` (string, optional)
- `data` (list of any, optional)

## Types

### ApiV2UsersResendUsernamePostRequestBodyContentApplicationJsonSchemaData

- `mobile_number` (string, optional)

## Examples

**Request**

```json
{
  "api": "resend-username",
  "data": {
    "mobile_number": "0400000000"
  }
}
```

**Response**

```json
{
  "message": "An SMS with your username has been sent to the mobile number ending with 340",
  "api": "resend-username",
  "status": "success",
  "data": []
}
```

**SDK Code**

```python Authentication_resendUsernameSms_example
import requests

url = "https://tbd/api/v2/users/resend-username"

payload = {
    "api": "resend-username",
    "data": { "mobile_number": "0400000000" }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Authentication_resendUsernameSms_example
const url = 'https://tbd/api/v2/users/resend-username';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"api":"resend-username","data":{"mobile_number":"0400000000"}}'
};

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

```go Authentication_resendUsernameSms_example
package main

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

func main() {

	url := "https://tbd/api/v2/users/resend-username"

	payload := strings.NewReader("{\n  \"api\": \"resend-username\",\n  \"data\": {\n    \"mobile_number\": \"0400000000\"\n  }\n}")

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

	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://tbd/api/v2/users/resend-username")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"api\": \"resend-username\",\n  \"data\": {\n    \"mobile_number\": \"0400000000\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://tbd/api/v2/users/resend-username")
  .header("Content-Type", "application/json")
  .body("{\n  \"api\": \"resend-username\",\n  \"data\": {\n    \"mobile_number\": \"0400000000\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tbd/api/v2/users/resend-username', [
  'body' => '{
  "api": "resend-username",
  "data": {
    "mobile_number": "0400000000"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Authentication_resendUsernameSms_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/users/resend-username");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"api\": \"resend-username\",\n  \"data\": {\n    \"mobile_number\": \"0400000000\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Authentication_resendUsernameSms_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "api": "resend-username",
  "data": ["mobile_number": "0400000000"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tbd/api/v2/users/resend-username")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```