Key Server API
A documentation of the REST api for the Photon key server used for encrypted cloud backup of the user's wallet seed.
Last updated
A documentation of the REST api for the Photon key server used for encrypted cloud backup of the user's wallet seed.
Last updated
POST
https://keys-dev.photonsdk.com/v2/key
Create a new encryption key e.g. when a new user registers to backup their data during app sign up.
Name | Type | Description |
---|---|---|
GET
https://keys-dev.photonsdk.com/v2/key/:keyId
Fetch the encryption key from the api endpoint.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
PUT
https://keys-dev.photonsdk.com/v2/key/:keyId
Change the PIN used for authenticating encryption key operations.
POST
https://keys-dev.photonsdk.com/v2/key/:keyId/user
Create a new user for the key. A user can be identified either by email address or phone number.
PUT
https://keys-dev.photonsdk.com/v2/key/:keyId/user/:userId
Verify a new user via the code sent via email or sms (op = "verify"). This api endpoint is also called to verify a PIN reset (op = "reset-pin"). In order to mitigate a SIM swap attack the PIN reset must be verified twice with a 30 day time delay in between.
GET
https://keys-dev.photonsdk.com/v2/key/:keyId/user/:userId/reset
Initiate a PIN reset for the key. A verification code will be sent to the provided email address or phone number.
DELETE
https://keys-dev.photonsdk.com/v2/key/:keyId/user/:userId
Delete an email address or phone number that is associated with a key.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
pin
string
A PIN required for authentication (at least 4 digits)
keyId
string
ID of the key
Authorization
string
Basic Authentication as a base64 encoded PIN in a user:pass pair
keyId
string
ID of the key
Authorization
string
Basic Authentication as a base64 encoded PIN in a user:pass pair
newPin
string
The new PIN (at least 4 digits)
keyId
string
ID of the key
Authorization
string
Basic Authentication as a base64 encoded PIN in a user:pass pair
userId
string
An email address or phone number
keyId
string
ID of the key
userId
string
Email address or phone number
op
string
Verify operation: "verify" or "reset-pin"
code
string
Verification code sent via email or sms
newPin
string
The new PIN to be set after a PIN reset
keyId
string
ID of the key
userId
string
Email address or phone number
keyId
string
ID of the key
userId
string
Email address or phone number
Authorization
string
Basic Authentication as a base64 encoded PIN in a user:pass pair