Category overview
An end-to-end encrypted text snippet service provided by the third-party service Clipzy™. For details, please refer to their Privacy Policy.
The core of Clipzy is "end-to-end encryption", which means the "keys" for encryption and decryption exist only on your and the recipient's devices. The server is only responsible for storing an "encrypted safe" that no one can open, thus ensuring absolute privacy of content.
How to Use: Two Methods
Depending on your security needs and usage scenarios, we provide two methods.
Method 1: Highest Security Level (Recommended)
This method follows a strict end-to-end encryption model where your original text and key are never sent to the server.
Applicable Scenarios: Sharing sensitive information in web applications, building secure online notes, etc.
Workflow:
- Step 1: Create and Encrypt (in your application)
1. Generate Key: Create a unique key locally on the client side.
2. Encrypt Content: Use this key to lock your original text into a safe.
3. Upload Safe: Call the POST /api/store endpoint to hand over the locked safe (ciphertext) to the server for storage, and the server will give you a locker number (ID).
4. Combine Share Link: Combine the locker number (ID) and your key into a special share link.
- Step 2: Share and Decrypt (in the recipient's application)
1. Parse Link: The recipient opens the link, and the application automatically separates the locker number and key from the link.
2. Retrieve Safe: Call the GET /api/get endpoint to retrieve the encrypted safe using the ID.
3. Unlock: Use the key to unlock the safe locally and view the original content.
The Complete JavaScript Example below demonstrates this method in detail.
Method 2: Server-side Decryption (Convenient for Automation)
This method has lower security because it requires you to send the key as a parameter to the server. However, it's very convenient for automated scripts (like curl or Python scripts) that cannot perform complex decryption operations.
Applicable Scenarios: Quickly retrieving previously stored configurations or secret information in command lines or backend services.
Workflow:
1. Preparation: You first need to know the ID (locker number) and key of an encrypted snippet. This is usually something you created earlier via Method 1 and saved yourself.
2. Request Decryption: Call the GET /api/raw/{id} endpoint, providing both the locker number (ID) and key to the server.
3. Get Original Text: The server uses the key you provided to unlock the safe and then directly hands you what's inside (the original plain text).
[!WARNING]
Use with caution! Although the server promises not to log keys or decrypted content, this operation breaks the strict end-to-end encryption model. Please use only when you trust the server or when the content sensitivity is low.
---
Code Examples
Example 1 (Highest Security): Complete JavaScript Implementation
Online API testing tools cannot simulate the complete end-to-end encryption process. The following example shows how to implement all steps from key generation to final decryption in your website or application through JavaScript. You can save this code as an HTML file and run it directly in a browser.
Example 2 (Convenient for Automation): Get Plain Text Directly Using cURL
Assuming you have already created an encrypted snippet through some method (e.g., running the JS example above) and obtained the ID and key:
- ID: tzy4AllxQP
- Key: a1b2c3d4e5f6g7h8 (this is just an example, actual keys are long Base64 strings)
Now, you can use curl directly in the command line anywhere to get the original text:
The server will return the decrypted plain text, which is very suitable for use in scripts.