Get the FREE Ultimate OpenClaw Setup Guide →
C

Protect PDF with password

@CrossServiceSolutions

npx machina-cli add skill @CrossServiceSolutions/password-protect-pdf --openclaw
Files (1)
SKILL.md
1.9 KB

password-protect-pdf

Purpose

This skill password-protects a PDF by:

  1. accepting a PDF file from the user,
  2. accepting a password from the user,
  3. uploading both to the Solutions API,
  4. polling the job status until it is finished,
  5. returning the download URL for the password-protected PDF.

Credentials

The API requires an API key used as a Bearer token:

  • Authorization: Bearer <API_KEY>

How the user gets an API key:

Rule: never echo or log the API key.

API endpoints

Base URL:

  • https://api.xss-cross-service-solutions.com/solutions/solutions

Create password-protect job:

  • POST /api/32
  • multipart/form-data parameters:
    • file (PDF-Datei) — required — PDF file
    • userPass (Passwort) — required — string password

Get result by ID:

  • GET /api/<ID>

When done, the response contains:

  • output.files[] with { name, path } where path is a downloadable URL.

Inputs

Required

  • PDF file (binary)
  • Password (userPass, string)
  • API key (string)

Optional

  • None

Output

Return a structured result:

  • job_id (number)
  • status (string)
  • download_url (string, when done)
  • file_name (string, when available)

Example output:

{
  "job_id": 321,
  "status": "done",
  "download_url": "https://.../protected.pdf",
  "file_name": "protected.pdf"
}

Source

git clone https://clawhub.ai/CrossServiceSolutions/password-protect-pdfView on GitHub

Overview

This skill accepts a PDF and a password, uploads both to the Solutions API, polls the job until completion, and returns a download URL for the encrypted PDF. It enables secure, shareable documents by automating PDF encryption and delivering a ready-to-use link.

How This Skill Works

Upload the PDF and userPass to POST /api/32 as multipart/form-data with a Bearer token. Poll GET /api/<ID> to monitor status until the job reports 'done', then return download_url (from output.files[].path) and file_name when available.

When to Use It

  • Securely share a PDF with a password before sending externally
  • Automate password protection in document workflows
  • Standardize encryption across PDFs in a CMS or portal
  • Deliver password-protected files to clients without sending the password in plaintext
  • Integrate with other services to enforce consistent document security

Quick Start

  1. Step 1: Prepare your PDF and a password
  2. Step 2: POST /api/32 with multipart/form-data including file and userPass and your API key
  3. Step 3: Poll GET /api/<ID> until status is 'done' and return download_url and file_name

Best Practices

  • Use a unique, strong password per file and avoid reusing passwords
  • Never log or expose your API key
  • Validate the input PDF and restrict allowed file types
  • Handle polling timeouts and API errors gracefully
  • Store and transfer the resulting download URL securely and only to authorized users

Example Use Cases

  • Encrypt a 15MB contract.pdf with a strong password and return the download URL for client download
  • Automatically password-protect reports before archiving and sharing via client portal
  • Integrate into a document ingestion pipeline to secure every uploaded PDF
  • Provide clients with a single, protected download link instead of emailing the file
  • Operate across services to standardize PDF security with Solutions API

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers