Get me
curl --request GET \
--url https://arena-predictions.com/api/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://arena-predictions.com/api/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://arena-predictions.com/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"private": true
},
"key": {
"prefix": "<string>",
"scopes": [
"<string>"
]
},
"mode": "paper"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}Identity
Get me
Whose account the presented key acts for and which scopes it carries. Needs a valid key and no particular scope, so an agent can discover its own permissions before trying anything that could fail.
GET
/
me
Get me
curl --request GET \
--url https://arena-predictions.com/api/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://arena-predictions.com/api/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://arena-predictions.com/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"private": true
},
"key": {
"prefix": "<string>",
"scopes": [
"<string>"
]
},
"mode": "paper"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}Authorizations
Authorization: Bearer arena_sk_... (the x-arena-key header is accepted too). Keys are created at /docs, shown once, stored hashed.