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.

Create Key

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.

Request Body

{
  "id": "36e6b967-eeeb-4b54-818b-13331416c9f4"
}

Get Key

GET https://keys-dev.photonsdk.com/v2/key/:keyId

Fetch the encryption key from the api endpoint.

Path Parameters

Headers

{
  "id": "36e6b967-eeeb-4b54-818b-13331416c9f4",
  "encryptionKey": "kjXCstWMW3ed3zBTU3sDg/XyPxPkbaz3yVfB9bP+w7A="
}

Change PIN

PUT https://keys-dev.photonsdk.com/v2/key/:keyId

Change the PIN used for authenticating encryption key operations.

Path Parameters

Headers

Request Body

{
  "message": "Success"
}

Create User

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.

Path Parameters

Headers

Request Body

{
  "message": "Success"
}

Verify User

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.

Path Parameters

Request Body

{
  "message": "Success"
}

Reset PIN

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.

Path Parameters

{
  "message": "Success"
}

Remove User

DELETE https://keys-dev.photonsdk.com/v2/key/:keyId/user/:userId

Delete an email address or phone number that is associated with a key.

Path Parameters

Headers

{
  "message": "Success"
}

Last updated