Rebrandly for Developers

Use our API to create, track and share custom short links that incorporate your brand domain name.

Get Started

OAuth flow

IMPORTANT: you don't need to implement an OAuth flow if you know the API key of the Rebrandly account. If you are using Rebrandly API with your own Rebrandly account, it's lot easier to use an API Key than to use an OAuth flow.

If you want to use the Rebrandly API in your app on behalf of a Rebrandly account, you need to authorize your application.
You can submit your authorization request at Rebrand.ly/AuthorizeMe.

When you authorize a new app in Rebrandly, a client_id is assigned to it.
That's enough to let your app users connect with their Rebrandly accounts:
if your users happen not to have a Rebrandly account, they will be able to register a new account from the same page and then get back to you.

You can either search for an OAuth client in your favorite programming language or you can configure your own HTTP calls.

If the following standard OAuth flow doesn't fit your needs, we can arrange together for another OAuth flow.

Using an OAuth client

There are plenty of OAuth clients you can include in your application to get the authorization job done for you.

Configuring a basic OAuth flow

If you need to take control over the http flow, here's how to manually setup the authentication process.
In order to get a valid token, you have to redirect your users to https://oauth.rebrandly.com/connect/authorize with the following query parameters:

Parameter
Description

client_id

The unique Client ID associated with your app.

redirect_uri

This is the callback to your app you asked to be authorized in your request. You can ask us to change it anytime.

response_type

This should be always token.

scope

This should be always rbapi.

A full URL would be like: https://oauth.rebrandly.com/connect/authorize with parameters ?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&response_type=token&scope=rbapi.

Your users will compile the Rebrandly Signin form and we will send them back to you via GET HTTP method (What if I need HTTP POST?) at the redirect_uri you provided in the request, with the token in URL:

http://yourapp.com/#access_token=YOUR_TOKEN&token_type=Bearer&expires_in=2592000&scope=rbapi

Authenticate requests with OAuth

Now that you have a valid token, you need to add this HTTP header in all future API requests to https://api.rebrandly.com:

Header name
Header value

Authorization

"Bearer YOUR_TOKEN"
(Bearer - or in general your token type -, then a white space, then the token)

Yet another cURL example:

curl \
-H "Authorization: Bearer YOUR_TOKEN" \
'https://api.rebrandly.com/v1/account'

OAuth flow


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.