By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Policy.
-
- ENG
Example: Share link: https://e.pcloud.link/publink/show?code=XYZ123 Direct link: https://e.pcloud.link/publink/getfile?code=XYZ123 You can build a simple web tool that automates the conversion. Frontend Example (HTML + JavaScript): <!DOCTYPE html> <html> <head> <title>pCloud Direct Link Generator</title> </head> <body> <h2>pCloud Direct Download Link Generator</h2> <input type="text" id="shareLink" placeholder="Paste pCloud share link" size="50"> <button onclick="generateDirectLink()">Generate</button> <p>Direct Link: <a href="#" id="directLink" target="_blank">Click to download</a></p> <script> function generateDirectLink() let shareLink = document.getElementById('shareLink').value; let codeMatch = shareLink.match(/[?&]code=([^&]+)/); if (codeMatch && codeMatch[1]) let code = codeMatch[1]; let directURL = `https://e.pcloud.link/publink/getfile?code=$code`; document.getElementById('directLink').href = directURL; document.getElementById('directLink').innerText = directURL; else alert("Invalid pCloud share link. Make sure it contains '?code='"); </script> </body> </html> Backend Example (Node.js + Express): For a more robust solution that handles API calls and adds forced download.
https://e.pcloud.link/publink/getfile?code=<SHARE_CODE> Where <SHARE_CODE> is the value after ?code= in your original share link.
);
try const apiURL = `https://api.pcloud.com/getpubliplink?code=$shareCode&forcedownload=1`; const response = await axios.get(apiURL); if (response.data.result === 0 && response.data.downloadlink) res.json( directLink: response.data.downloadlink ); else res.status(404).json( error: 'Could not retrieve direct link' ); catch (err) res.status(500).json( error: 'Server error' );
1. Introduction pCloud is a popular cloud storage service known for its strong security (client-side encryption with pCloud Crypto), lifetime plans, and media playback features. However, when you share a file via a standard pCloud share link, recipients typically land on a branded pCloud webpage where they must click a "Download" button. This is inconvenient for automation, direct linking in scripts, integrating with download managers (like IDM or JDownloader), or embedding downloads into websites. pcloud direct download link generator
app.listen(3000, () => console.log('pCloud generator running on port 3000'));
const express = require('express'); const axios = require('axios'); const app = express(); app.get('/generate', async (req, res) => const shareCode = req.query.code; if (!shareCode) return res.status(400).json( error: 'Missing share code' ); Example: Share link: https://e
This returns a JSON with downloadlink – that link directly downloads the file. curl "https://api.pcloud.com/getpubliplink?code=k7Mv7XZabc123&forcedownload=1" Response:
"result": 0, "downloadlink": "https://e.pcloud.link/publink/getfile?code=k7Mv7XZabc123&filename=example.zip" https://e
Append &forcedownload=1 to ensure no web preview. If you don’t want to use the API, try this pattern (works for most files except media previews ):