← Short.io

Expire a Link. with Short.io API

Pipedream makes it easy to connect APIs for Short.io and 900+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Expire a Link. with the Short.io API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Create a workflow to Expire a Link. with the Short.io API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Expire a Link. action
    1. Connect your Short.io account
    2. Select a Link
    3. Configure Expires at
    4. Configure Expired URL
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Expire a Link. with Short.io API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Short.io
 
Try it
Expire a Link. with Short.io API on New Message in Channel from Discord Bot API
Discord Bot + Short.io
 
Try it
Expire a Link. with Short.io API on New Submission from Typeform API
Typeform + Short.io
 
Try it
Expire a Link. with Short.io API on Custom Events from Zoom API
Zoom + Short.io
 
Try it
Expire a Link. with Short.io API on New Submission (Instant) from Jotform API
Jotform + Short.io
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Expire a Link. on Short.io
Description:Expire a link by id. [See the docs](https://developers.short.io/reference/linksbylinkidpost).
Version:0.0.1
Key:short-expire-a-link

Code

import shortApp from "../../short.app.mjs";
import lodash from "lodash";

export default {
  key: "short-expire-a-link",
  name: "Expire a Link.",
  description: "Expire a link by id. [See the docs](https://developers.short.io/reference/linksbylinkidpost).",
  version: "0.0.1",
  type: "action",
  props: {
    shortApp,
    shortLink: {
      propDefinition: [
        shortApp,
        "link",
      ],
    },
    expiresAt: {
      propDefinition: [
        shortApp,
        "expiresAt",
      ],
      optional: false,
    },
    expiredURL: {
      propDefinition: [
        shortApp,
        "expiredURL",
      ],
      optional: false,
    },
  },
  async run({ $ }) {
    const url = new URL(this.shortLink);
    const domain = url.host;
    const path = url.pathname.split("/").join("");
    const linkInfo = await this.shortApp.getLinkInfo(domain, path);

    const param = lodash.pick(linkInfo, [
      "domain",
      "originalURL",
      "path",
      "title",
      "tags",
      "allowDuplicates",
      "iphoneURL",
      "androidURL",
      "password",
      "utmSource",
      "utmMedium",
      "utmCampaign",
      "utmTerm",
      "utmContent",
      "cloaking",
      "redirectType",
    ]);

    param.expiresAt = this.expiresAt;
    param.expiredURL = this.expiredURL;

    const link = await this.shortApp.updateLink($, linkInfo.idString, param);
    $.export("$summary", `Successfully updated the link: ${link.secureShortURL}`);
    return link;
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Short.ioshortAppappThis component uses the Short.io app.
LinkshortLinkstringSelect a value from the drop down menu.
Expires atexpiresAtstring

Link expiration date, use yyyy-mm-dd format.

If no expiration date is given (default), link will never expire.

Expired URLexpiredURLstring

URL to redirect when the link is expired.

Authentication

Short.io uses API keys for authentication. When you connect your Short.io account, Pipedream securely stores the keys so you can easily authenticate to Short.io APIs in both code and no-code steps.

Get your secret key here.

About Short.io

White label URL Shortener

More Ways to Use Short.io

Triggers

New event for each link created. from the Short.io API

Emit new event when a link is created.

 
Try it

Actions

Create a Short Link with the Short.io API

Create a Short Link. See the docs.

 
Try it
Delete a Short Link with the Short.io API

Delete a Short Link. See the docs.

 
Try it
Domain Statistics. with the Short.io API

Returns detailed statistics for domain in given period. See the docs.

 
Try it
Update a Short Link. with the Short.io API

Update original url, title or path for existing URL by id. See the docs.

 
Try it