Pi Durable Platformdocs
ReferenceMe

The signed-in user, CSRF token and capabilities

GET
/v1/me

Also takes Authorization: Bearer with a personal API key or an app's OAuth Connect access token (its person; csrfToken is empty, and an app's capabilities are none), never a service account key (403 person_required).

Query Parameters

optional?boolean

With true, a request without a session cookie gets data null (200) instead of a 401, for pages that work signed out. An expired session is still a 401 (and clears the cookie).

Response Body

Current user (null only with optional=true and no session cookie)

application/json
  1. response
data*|null
curl -X GET 'https://agents.example.com/v1/me'
{  "data": {    "teams": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "slug": "string",        "name": "string",        "status": "active",        "role": "owner",        "kind": "team"      }    ],    "groups": [      "string"    ],    "user": {      "revision": 0,      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "email": "string",      "displayName": "string",      "platformRole": "none",      "status": "active",      "createdAt": "2019-08-24T14:15:22Z",      "lastLoginAt": "2019-08-24T14:15:22Z",      "teamCount": 0    },    "csrfToken": "string",    "capabilities": {      "platformAdmin": true,      "platformAuditor": true    }  }}