*Automating bitly links should only be implemented when each message will be using a URL custom to the recipient. If using a static URL, it is best practice to manually add the shortened link to the SMS message body.
**Bit.ly API Rate limits are enforced when generating links. These limits are available at https://dev.bitly.com/rate_limiting.html
The Sureshot SMS Application Supports the generation of Bit.ly links in-app using the “Web API” field. The user must previously have access to a bit.ly account to successfully create a new link. This guide will direct the user how to :
A. Create a Bit.ly Web API Template for all users
B. How to add a Bit.ly link to SMS content
Bit.ly Get URL Generic Template:
{get_bitly: token: '[BitlyAccessToken] ', url: '[url]'}}
Creating a Bit.ly Web API Template
- Log in to Bit.ly account
- Click the Menu at the top right
- Click the user to Edit Profile
- Click “Generic Access Token
- Enter the User’s password to generate an “Access Token”
- This will replace “[BitlyAccessToken] in the URL template
Ex. {get_bitly: token: '12345678901234567890123456 ', url: '[url]'}}
- Open the SMS application in the Sureshot Portal (app.incindio.com)
- Click Manage on the right side of the application
- Click Global Configuration
- Scroll down to the last section “WEB API GENERATED VALUES” and click “Add Web Api Field”
- Name the Template using the “Field Name” free text field
- Select Content under the “Response Type”
- Enter the Bit.ly Generic Template from the beginning of this document, replacing [BitlyAccessToken] with the user’s bit.ly access token, in the “URL” field
- Click Create
- The template will now appear under “WEB API GENERATED VALUES”
- Click Submit to return to the dashboard
Adding a Bit.ly link to SMS content
- Create or open an SMS config
- Navigate to the “Merge Fields” section
- Select the newly created “Bitly Template”
- The application will drop a get url command into the message content
- Replace [LongURL] with the URL to be converted to a Bit.ly link
Note: Field merges maybe used to add parameters to the URL. This will cause a unique link to be created for every contact. Eg. Here is a link that contains a first name parameter defined by a contact merge field {{get_url:https://api-ssl.bitly.com/v3/shorten?access_token=06885a0af448dfb004ef3413b929c11080a444a0&format=txt&longUrl=https://google.com?firstname={{C_FirstName}}}}
- Once the message content is complete click “Next” to continue creating the message
- On the final page click test to send a test message
Note: If using field merges user must test using the Email Address field
- A green success box will appear indicating the message was sent
Note: The created link will also appear in the Bit.ly dashboard
- Click Submit to save the configuration