Pubkey [v1]
/auth/v1/pubkey
get Get public key
Parameters
Authorization(in header):stringGiven Bearer token will use this as authorization for the API
Response
200PasswordPublicKeyResponse: OK
PasswordPublicKeyResponse
pubkey:stringpubkey_encode:stringts:string
TOC
API usageRequest exampleResponse fieldsEncryption workflowEnd-to-end exampleUse encrypted value in later requestsAPI usage
Use this API to get the RSA public key and timestamp used for encrypting password parameters.
Request example
Response fields
Encryption workflow
- Call
/auth/v1/pubkeyto gettsandpubkey. - Build a JSON payload with your plaintext password:
{"ts":"<ts>","password":"<plain password>"}. - Encrypt the payload with the returned public key using RSA PKCS#1 v1.5.
- Base64-encode the encrypted bytes.
- Use the Base64 result as the value of password fields (for example
passwordorold_password) in subsequent requests.
End-to-end example
Use encrypted value in later requests
If ts is expired, request /auth/v1/pubkey again and regenerate encrypted parameters.