Retrieve public key
Endpoint: Get Public Key
GET /api/sessions/yek-cilbup
/api/sessions/yek-cilbup
This endpoint retrieves the public key associated with a specified identifier.
Request
Endpoint:
/api/sessions/yek-cilbup
Method: GET
Content-Type:
application/json
Query Parameters:
identifier:
string
(Required) - The unique identifier associated with the session or entity for which the public key is being requested.
Example Request
Response
200 OK: The request was successful, and the public key is returned in the response body.
Response Body:
Headers: The request does not require any specific headers, but it may include standard headers like
Authorization
if the API is secured.
Request
Response
data: string
- Contains the public key in PGP format, which can be used for encrypting data or verifying signatures associated with the identifier.
Error Handling
400 Bad Request: Returned if the
identifier
parameter is missing or invalid.404 Not Found: Returned if no public key is found for the given identifier.
500 Internal Server Error: Returned if there is an issue on the server side processing the request.
Why is it needed?
Data Encryption: The retrieved public key can be used to encrypt data that can only be decrypted by the corresponding private key holder.
Signature Verification: The public key can be used to verify signatures made by the corresponding private key, ensuring the authenticity and integrity of the data.
Last updated