Users

Submit attested age floor

Changed on

Submits the age floor the device reported, signed by a registered App Attest key. client_data holds the exact JSON bytes the app signed, with the challenge from a challenge with purpose assert and the age_floor. Only the adult floor is accepted. It stores that the account's age range is 18 or over, with the time it was received, which unlocks mature content in regions where a date of birth typed in is not enough for mature content. It does not change the date of birth or any setting. Any other floor returns AGE_RANGE_NOT_ADULT with status 403 and nothing is stored. When the request ends, whatever the outcome, every App Attest key registered to the current user is deleted, so the app registers a new key before each submit. Returns APP_ATTEST_KEY_NOT_REGISTERED when the key is unknown, in which case the app should register a new key. Returns APP_ATTEST_NOT_AVAILABLE with status 404 when this instance does not accept App Attest. Returns FEATURE_NOT_AVAILABLE_SELF_HOSTED with status 403 on a self-hosted instance, and AGE_RANGE_NOT_NEEDED with status 403 when the request does not come from a region where a date of birth typed in is not enough for mature content.

post/users/@me/age-range

Request

Request body

key_idstring required

App Attest key identifier from DCAppAttestService, 32 bytes as standard base64

assertionstring required

Assertion from DCAppAttestService.generateAssertion as standard base64

client_datastring required

The exact UTF-8 JSON bytes the app signed, as standard base64. The JSON holds challenge and age_floor

Response

Success

age_floor'adult' required

Age floor that was accepted, which is always adult

Changes