Skip to content

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

Sequence Diagram

API Endpoints

MethodPathAuthDescription
GET/registration-keysAuthenticated userList the caller's active registration keys

Response Body

json
{
  "registration_keys": [
    {
      "key": "AB1234",
      "generated_at": 1714556400,
      "expires_at": 1714557600
    }
  ]
}
FieldTypeDescription
keystring6-character uppercase alphanumeric key
generated_atintegerUnix timestamp when the key was generated
expires_atintegerUnix 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

CodeReason
200 OKKeys returned (may be an empty list)
401 UnauthorizedNo valid JWT present
500 Internal Server ErrorUnhandled exception

See the API Reference for full schema documentation.

Deployment

See the deployment workflow documentation for workflow steps, infrastructure dependencies, and failure scenarios.