ProfileService
Generate Username Options
Generate five random username options for an account that has never claimed a username.
Method
POST
Path
/v1/auth/profile/username-options:generate
Visibility
Authentication
Session token
MFA Requirement
Not required
POST
/v1/auth/profile/username-options:generate Request
Testnet
curl --request POST \ \ --url 'https://api.testnet.polyester.com/v1/auth/profile/username-options:generate' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"expiresAt": "2025-01-01T00:00:00Z",
"offerToken": "eyJ2IjoxLCJzdWIiOiI3NTYzODk3NDQ2NTQ2IiwidXNlcm5hbWVzIjpbImFscGhhX3RyYWRlciIsImJldGFfYnVpbGRlciIsImdhbW1hX21ha2VyIiwiZGVsdGFfY2hhcnQiLCJlcHNpbG9uX2Rlc2siXSwiZXhwIjoxNzY3MjI2MjAwfQ.ZXhhbXBsZS1zaWduYXR1cmU",
"usernames": [
"value"
]
} usernames string[]
Five distinct generated usernames available when this offer was created.
Example
["value"] offerToken string
Opaque proof required to claim one of the returned usernames.
Example
eyJ2IjoxLCJzdWIiOiI3NTYzODk3NDQ2NTQ2IiwidXNlcm5hbWVzIjpbImFscGhhX3RyYWRlciIsImJldGFfYnVpbGRlciIsImdhbW1hX21ha2VyIiwiZGVsdGFfY2hhcnQiLCJlcHNpbG9uX2Rlc2siXSwiZXhwIjoxNzY3MjI2MjAwfQ.ZXhhbXBsZS1zaWduYXR1cmU expiresAt string (date-time)
Time in UTC after which this offer can no longer be claimed.
Example
2025-01-01T00:00:00Z| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |