# Get the current user

Section: Your data › Profile & preferences

```
GET https://ba.joexyz.online/api/v1/me
```

Gets the user who owns the API key. `externalId` is the Clerk user id.

## Authentication

Bearer Token — `Authorization: Bearer <token>` (inherited from folder "Your data")

## Example responses

### 200 OK

```http
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 119
X-RateLimit-Reset: 1793620860
```

```json
{
  "data": {
    "id": "jd7erxxxq9g5dt2hkdmsmwamhs7m2aw1",
    "createdAt": "2025-07-20T14:16:44.478Z",
    "name": "Joe",
    "externalId": "user_308tPUX82qIALFSBNzJl3b4KFYv",
    "username": "joexyz",
    "avatar": "https://img.clerk.com/eyJ0eXBlIjoicHJveHkiLCJzcmMiOiJodHRwczovL2ltYWdlcy5jbGVyay5kZXYvb2F1dGhfZGlzY29yZC9pbWdfMzA4dFBaNlpUeFJSb1FKbkdGRUE5Vm1HMDdWIn0"
  }
}
```

### 401 Unauthorized

```json
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "A valid API key is required. Send it as `Authorization: Bearer <key>`."
  }
}
```

### 429 Too Many Requests

```http
Retry-After: 23
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1793620860
```

```json
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests. Try again in 23 seconds."
  }
}
```

## Examples

### cURL

```bash
curl https://ba.joexyz.online/api/v1/me \
  -H 'Authorization: Bearer {{api_key}}'
```

### JavaScript

```javascript
const response = await fetch("https://ba.joexyz.online/api/v1/me", {
  headers: {
    "Authorization": "Bearer {{api_key}}",
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://ba.joexyz.online/api/v1/me"
headers = {
    "Authorization": "Bearer {{api_key}}",
}

response = requests.get(url, headers=headers)
print(response.json())
```

### Go

```go
package main

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

func main() {
	req, err := http.NewRequest("GET", "https://ba.joexyz.online/api/v1/me", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer {{api_key}}")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```
