Get your public key
This operation allow you to query your registered public key to allow system cipher sensitive data in responses and system public key to cipher sensitive data in your request. If a public key is not registered you can register one using Add Public Key.
note
The response has a "sensitive_data" property containing a ciphered text for testing purposes, the plain text that you must obtain is: "All your base are belong to us..." .
HTTP Request
GET /clients/api_key/public_key
Header Parameters
Header | Description |
---|---|
Authorization required | The Bearer token created in Get authorization Token |
Content-Type required | application/json |
Example JSON Request:
GET /clients/api_key/public_key
Example JSON Response:
{
"success": true,
"code": 0,
"message": "OK",
"data": {
"client": {
"id": "12345abc-ebb5-56d8-3256-9875672a3455",
"name": "CAPSULE CORP",
"alias": "CAPSULE",
},
"api_key": {
"id": "54321abc-abc5-56d8-6987-9875672a6587",
"alias": "DEFAULT_API_KEY",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuSH7IAJikX+jhtH8RROa\nWvwc4ISXXOCufLFk5DIrzK8thXpgAvFe9mg2J0kg5DSu0+FMLbfmmiMGsAElirs7\nK3LO2SgGLultdLdDcnlDNqXJNTJudhhVcAcIP93UBoN8XgH9rnqdXB4GXCGk5QCz\nV/Cfk6O8VyIKG9mGlRx5HJkPyjnJfrYptoNag9hMBc+TIfuhlOycG3+C1KdOUvsL\nQet6twHr0NBt8NyAOAP32v9slRFZS1tWn2ZcJMIfb+qYspcNhV1LB1CijHyjImaC\nOhyh3Cbf3/u7xv0qoHHmPcUmXniA9I+yA4taogx0NUE1pWjXqqtKjBhpS57leh60\nxQIDAQAB\n-----END PUBLIC KEY-----"
},
"system": {
"public_key": "-----BEGIN PUBLIC KEY-----\nMIGTYAFSRW6RKAFGHYTRFDERTGTYTAR5FDSBCgKCAQEAuSH7IAJikX+jhtH8RROa\nWvwc4ISXXOCufLFk5DIrzK8thXpgAvFe9mg2J0kg5DSu0+FMLbfmmiMGsAElirs7\nK3LO2SgGLultdLdDcnlDNqXJNTJudhhVcAcIP93UBoN8XgH9rnqdXB4GXCGk5QCz\nV/Cfk6O8VyIKG9mGlRx5HJkPyjnJfrYptoNag9hMBc+TIfuhlOycG3+C1KdOUvsL\nQet6twHr0NBt8NyAOAP32v9slRFZS1tWn2ZcJMIfb+qYspcNhV1LB1CijHyjImaC\nOhyh3Cbf3/u7xv0qoHHmPcUmXniA9I+yA4taogx0NUE1pWjXqqtKjBhpS57leh60\nxQIDAQAB\n-----END PUBLIC KEY-----"
},
"sensitive_data": "odsfsodiurfopsjf0w9ierf0w9ef098409mrd0394u08923nxc98n23b8v2378rtn8274rtbxcbtc"
}
}