Naar inhoud springen
API-referentie
API-referentie

Het huidige account ophalen

De gebruikers- en accountcontext ophalen die beschikbaar is voor de gepresenteerde API-sleutel.

De gebruikers- en accountcontext ophalen die beschikbaar is voor de gepresenteerde API-sleutel.

Eindpunt

GET /api/v1/me
Basis-URL
https://runapi.ai
API-versie
v1
Authenticatie
Authorization: Bearer YOUR_API_KEY
02

Succesvol antwoord

HTTP 200

GET /api/v1/me

JSON
{
  "account": {
    "id": 7,
    "name": "Example Studio"
  },
  "email": "[email protected]",
  "id": 42,
  "name": "Ada"
}
03

Foutrespons (401)

HTTP 401
Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

JSON
{
  "error": "Authentication required"
}
04

Foutrespons (403)

HTTP 403
Responsschema
JSON
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Responsvoorbeeld

JSON
{
  "error": "Standard API key required"
}
05

cURL-voorbeeld

CURL
curl -X GET https://runapi.ai/api/v1/me \
  -H 'Authorization: Bearer YOUR_API_KEY'