Bitly is a well-known URL shortener and link management platform and the Studio is providing users to experience and implement the features of the BItly platform in their micro apps with the help of Bitly Connector. You can now get groups and create shortened URLs.
Configuring Bitly Connector
To add Bitly connector in your account you simply have to find Bitly under Studio > Connectors, click (+) Connector.
Select it and click on Connect BItly. A pop-up will display asking you to connect to your Bitly account. Authorize it and your Bitly connector will be ready
Using Bitly Connector
Now that we have configured the Bitly connector, you will see that various endpoints are available with the connector.
These endpoints will be useful to work with the data to fetch from and feed data to the Bitly groups present in its database.
Get group(s) details
You can view the details like – account creation date, GUID, organization name, and more - of the user account(s) present in the ID, we have to go to the data-bind section of our control and select the Bitly connector, select GetGroups endpoint, and finally select our configured account.
Do a refresh response, then bind the keys as columns for the control and click Test & Finish.
Create shortened URL
The main purpose of using the Bitly connector service is to create short URLs of long URLs. To do this we have a dedicated endpoint called GenerateShortLink.
We have a microapp with several controls.
On the trigger event of the button, we will add a server-side action of Bitly connector with GenerateShortLink endpoint then select the configured account.
Now, provide the necessary details like keywords for long URLs and group GUID.
Add a variable to use the response and then click Finish.
Add another event to set the received output from the connector to JSON viewer.
Preview the app and you will get your shortened URL of a long URL.