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

# Who Am I

GET https://api.wynncraft.com/v3/player/whoami

This endpoint is not cached.   See [Caching](/welcome#caching).  This endpoint belongs to the PLAYER rate-limit bucket. See [Throttling and Rate Limits](/welcome#throttling-and-rate-limits).

Try it will not return usable data for this route. It depends on authentication and IP-aware context, so test it against the live API outside the docs.

Data returned here depends on the accounts you used to join Wynncraft. Those accounts represent who we think you are and are used for account-aware features such as store auto-login and map live position viewing.

Reference: https://docs.wynncraft.com/modules/player/get-player-identity

## Response

### 200

Identity mapping keyed by player UUID.

- `map from string to PlayerIdentity`

## Errors

### 403 Forbidden Error

No eligible online identity could be resolved.

- `error` (string, required)
- `detail` (string, required)
- `code` (integer, required)

## Types

### PlayerIdentity

- `username` (string, required)
- `online` (boolean, required)
- `nickname` (string, required, nullable)
- `rank` (string, required)
- `supportRank` (string, required, nullable)
- `shortenedRank` (string, required)
- `legacyRankColour` (LegacyRankColour, required)
- `rankBadge` (string, required)

### LegacyRankColour

- `main` (string, required)
- `sub` (string, required)

## Examples

**Response**

```json
{
  "98bc2236-ada5-4039-b560-8aaa4cc50384": {
    "username": "Nepmia",
    "online": false,
    "nickname": "Neplicopter",
    "rank": "WebDev",
    "supportRank": "champion",
    "shortenedRank": "WebDev",
    "legacyRankColour": {
      "main": "#aa0000",
      "sub": "#ff5555"
    },
    "rankBadge": "nextgen/badges/rank_webdev.svg"
  }
}
```

**SDK Code**

```python Authenticated player identity mapping
import requests

url = "https://api.wynncraft.com/v3/player/whoami"

response = requests.get(url)

print(response.json())
```

```javascript Authenticated player identity mapping
const url = 'https://api.wynncraft.com/v3/player/whoami';
const options = {method: 'GET'};

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

```go Authenticated player identity mapping
package main

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

func main() {

	url := "https://api.wynncraft.com/v3/player/whoami"

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

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

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

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

}
```

```ruby Authenticated player identity mapping
require 'uri'
require 'net/http'

url = URI("https://api.wynncraft.com/v3/player/whoami")

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

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

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

```java Authenticated player identity mapping
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.wynncraft.com/v3/player/whoami")
  .asString();
```

```php Authenticated player identity mapping
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.wynncraft.com/v3/player/whoami');

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

```csharp Authenticated player identity mapping
using RestSharp;

var client = new RestClient("https://api.wynncraft.com/v3/player/whoami");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Authenticated player identity mapping
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.wynncraft.com/v3/player/whoami")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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