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

# Get OAuth2 identity

GET https://api.wynncraft.com/v3/oauth/me

Try it will not return usable data for this route. It depends on a live OAuth2 authentication context outside the docs.

Get started with OAuth by reading [our guide](/oauth2/creating-an-application).

This endpoint returns the authenticated OAuth2 application context and the linked player profiles available to the authorized user.

The `profiles` object contains the player profiles that belong to the authorizing user. Access-rule bypass through OAuth2 only applies to those linked profiles when the user granted permission for it.

Reference: https://docs.wynncraft.com/modules/o-auth-2/get-oauth-identity

## Response

### 200

OAuth2 application context and linked profiles.

- `application` (OAuthApplication, required)
- `profiles` (map from string to OAuthProfile, required)

## Types

### OAuthApplication

- `client_id` (string, required)
- `scopes` (list of string, required)

### OAuthProfile

- `username` (string, required)
- `primary` (boolean, required)
- `rank` (string, required)
- `supportRank` (string, required, nullable)
- `shortenedRank` (string, required)
- `legacyRankColour` (LegacyRankColour, required)
- `rankBadge` (string, required)
- `accessRules` (map from string to string, required)

### LegacyRankColour

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

## Examples

**Response**

```json
{
  "application": {
    "client_id": "9fcXAZx0_h2-1FqsTjVQzK_dnOSzmToD",
    "scopes": [
      "identify",
      "main_access"
    ]
  },
  "profiles": {
    "98bc2236-ada5-4039-b560-8aaa4cc50384": {
      "username": "Nepmia",
      "primary": true,
      "rank": "Administrator",
      "supportRank": "champion",
      "shortenedRank": "Admin",
      "legacyRankColour": {
        "main": "#aa0000",
        "sub": "#ff5555"
      },
      "rankBadge": "nextgen/badges/rank_administrator.svg",
      "accessRules": {
        "main_access": "public",
        "character_list_access": "public",
        "character_data_access": "public",
        "character_build_access": "public",
        "online_status": "friend",
        "hunted_characters_access": "public",
        "guild_history_access": "public"
      }
    }
  }
}
```

**SDK Code**

```python OAuth2 application context with one linked profile
import requests

url = "https://api.wynncraft.com/v3/oauth/me"

response = requests.get(url)

print(response.json())
```

```javascript OAuth2 application context with one linked profile
const url = 'https://api.wynncraft.com/v3/oauth/me';
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 OAuth2 application context with one linked profile
package main

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

func main() {

	url := "https://api.wynncraft.com/v3/oauth/me"

	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 OAuth2 application context with one linked profile
require 'uri'
require 'net/http'

url = URI("https://api.wynncraft.com/v3/oauth/me")

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 OAuth2 application context with one linked profile
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php OAuth2 application context with one linked profile
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp OAuth2 application context with one linked profile
using RestSharp;

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

```swift OAuth2 application context with one linked profile
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.wynncraft.com/v3/oauth/me")! 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()
```