Coding standards
Security in ResourceSpace
Developer reference
Database
User api session functions
Geolocation functions
Storage test functions

Table: user_api_session_code

Stores single-use codes that a destination can exchange for a user's API session signing key. Codes expire after 120 seconds. A successful exchange removes the record.

ColumnTypeNote
code_hashvarchar(64)SHA-256 hash of the code sent to the destination.
userint(11)Reference to the user who approved the exchange.
systemvarchar(100)Configuration key identifying the destination that can redeem the code.
redirect_uritextExact callback URL the destination must supply when redeeming the code.
code_challengevarchar(43)Unpadded base64url encoding of the SHA-256 hash of the destination's PKCE verifier.
key_hashvarchar(64)SHA-256 hash of the user's API session signing key at issuance. A change to the key prevents redemption.
querydatatextJSON array of user identity field names approved for release to the destination.
expiresint(11)Unix timestamp in seconds at which the code expires.

This table is empty by default.

Please see the schema overview for context. This document was last updated on the 19th of November 2026 at 18:35 (Europe/London time).