cURL
Basic (no authentication)JavaScript (Node.js)
Python
iOS Shortcuts
You can automate URL shortening directly from your iPhone or iPad using the Shortcuts app.Add a URL action
In the Shortcuts app, add a URL action and set the value to
https://www.shorturlx.xyz/api/shorten.Add a Get Contents of URL action
Add a Get Contents of URL action with the following settings:
- Method: POST
- Headers: add
Authorization=Bearer YOUR_API_KEYandContent-Type=application/json - Request body: JSON — add a key
urlwith the URL you want to shorten (use a Shortcut variable if needed)
Extract the short URL
Add a Get Dictionary Value action to extract the
shortUrl key from the response.