Working with asymmetric public key
Contents
[
Hide
]
Aspose.Words REST API includes a GetPublicKey method that allows developers to retrieve the public key for an asymmetric encryption algorithm. The public key is returned in the form of a string, which can then be used to encrypt data.
Asymmetric encryption uses two different keys, a public key and a private key. The public key can be shared with anyone and is used to encrypt data, while the private key is kept secret and is used to decrypt data.
Get asymmetric public key REST API
Server: https://api.aspose.cloud/v4.0
| Method | Endpoint |
|---|---|
| GET | /words/encryption/publickey |
Note: Requires Client Id and Secret. See Quick Start to obtain credentials.
Response
Response model: PublicKeyResponse
| Field | Type | Description |
|---|---|---|
| Model | PublicKeyResponse | REST response for RSA public key info. |
Error reference
| Status | Code | Description | Resolution |
|---|---|---|---|
| 401 | unauthorized |
Missing or invalid access token | Obtain a new access token via the authentication endpoint |
| 403 | forbidden |
Access to the requested resource is denied | Verify that the access token has the required permissions |
| 404 | not_found |
The requested resource does not exist | Check the resource ID or path for typos |
| 429 | rate_limited |
Too many requests — rate limit exceeded | Wait for the Retry-After period before making another request |
| 500 | internal_error |
An unexpected server error occurred | Retry the request after a short delay; contact support if the issue persists |
Usage examples
REST API
SDK
See Also
- Cloud SDKs — Create, Edit, Convert and Render Word documents via REST API.