func-api-registration-keys-get
Description
Returns all active (non-expired) registration keys that were generated by the authenticated user. Keys are matched by the Cognito sub stored at generation time, so each user sees only their own keys. Keys that have passed their 30-minute TTL are excluded even if DynamoDB has not yet purged them.
Requires a valid Cognito JWT (any authenticated user).
Invocation
Invoked by API Gateway on an HTTP GET /registration-keys request.
Sequence Diagram
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /registration-keys | Authenticated user | List the caller's active registration keys |
Response Body
json
{
"registration_keys": [
{
"key": "AB1234",
"generated_at": 1714556400,
"expires_at": 1714557600
}
]
}| Field | Type | Description |
|---|---|---|
key | string | 6-character uppercase alphanumeric key |
generated_at | integer | Unix timestamp when the key was generated |
expires_at | integer | Unix timestamp when the key expires (30 minutes after generation) |
Keys are returned sorted by generated_at ascending. An empty list is returned when the user has no active keys.
Response Codes
| Code | Reason |
|---|---|
200 OK | Keys returned (may be an empty list) |
401 Unauthorized | No valid JWT present |
500 Internal Server Error | Unhandled exception |
See the API Reference for full schema documentation.
Deployment
See the deployment workflow documentation for workflow steps, infrastructure dependencies, and failure scenarios.