V1Whoami
Get Whoami
Happy path: a valid partner key and a user access token issued to that partner's OAuth client.
Required variables:
- baseUrl
- apiKey (a
lyh_...partner key) - userToken (an OAuth access token;
bun run partners:dev-setupprints one for local development)
Response headers on success and on 429: X-RateLimit-Limit,
X-RateLimit-Remaining, X-RateLimit-Reset; Retry-After on 429/503.
Besides 200, the examples list every other state this endpoint family can
return. Errors are always { "error": { "code", "message" } }: switch on
code, not the message.
Authorization
bearerAuth userTokenAuth AuthorizationBearer <token>
Partner API key (lyh_...): identifies the calling partner, its scopes and rate limit.
In: header
X-User-Token<token>
The user's OAuth 2.1 access token, issued by Land Your Home's OAuth server to this partner's OAuth client. Requests run as this user.
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/whoami"{ "partner": { "id": "9e4c2589-7a47-45de-b0e4-98bdccf4ebaf", "name": "Acme Estates" }, "user": { "id": "0f35cecd-d237-43c4-a2b3-88b5e3bda993" }, "scopes": [ "chains:read", "chains:write" ]}
