Bitly

URL shortener

Go to site

Bitly API Integrations

Build and run workflows using the Bitly API. Use 1000s of source-available triggers and actions across 1000+ apps. Or write custom code to integrate any app or API in seconds.

Overview

The Bitly API allows developers to build apps that interact with the Bitly URL shortening service. With the API, developers can create new short links, expand short links, and retrieve the clicks data for short links.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    bitly: {
      type: "app",
      app: "bitly",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://api-ssl.bitly.com/v4/user`,
      headers: {
        Authorization: `Bearer ${this.bitly.$auth.oauth_access_token}`,
      },
    })
  },
})
Shorten a Link with Bitly API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Bitly
 
Try it
Shorten a Link with Bitly API on New Item in Feed from RSS API
RSS + Bitly
 
Try it
Shorten a Link with Bitly API on New Message from Discord API
Discord + Bitly
 
Try it
Shorten a Link with Bitly API on New Message In Channels from Slack API
Slack + Bitly
 
Try it
Shorten a Link with Bitly API on New Message in Channel from Discord Bot API
Discord Bot + Bitly
 
Try it
Create a Bitlink with the Bitly API

Converts a long url to a Bitlink and sets additional parameters.See the docs here

 
Try it
Expand a Bitlink with the Bitly API

Retrieves information about Bitlink using id. See the docs here

 
Try it
List Bitlinks by group with the Bitly API

Retrieves all Bitlinks for a given group. See the docs here

 
Try it
Retrieve a Bitlink with the Bitly API

Finds an existing Bitlink in your account. Optionally, creates one if none are found. See the docs here

 
Try it
Shorten a Link with the Bitly API

Converts a long url to a Bitlink.

 
Try it

Authentication

Bitly uses OAuth authentication. When you connect your Bitly account, Pipedream will open a popup window where you can sign into Bitly and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Bitly API.

Pipedream requests the following authorization scopes when you connect your account:

OAuth Request Configurations:
  1. authorization
    GEThttps://bitly.com/oauth/authorize?client_id={{oauth.client_id}}&redirect_uri={{oauth.redirect_uri}}&state={{oauth.state}}&response_type=code&scope={{oauth.space_separated_scopes}}
  2. accessToken
    POSThttps://api-ssl.bitly.com/oauth/access_tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&redirect_uri={{oauth.redirect_uri}}&grant_type=authorization_code&code={{oauth.code}}