Share buttons
Bitly short links for share buttons: getting an access token
Quick answer
To use Bitly short links in share buttons, sign in to Bitly, open your account settings, find the API or developer section, and generate an access token after confirming your password. Paste that token into your sharing plugin's short link setting, then clear caches. Short links are optional: most networks shorten links themselves.
On this page
Why share buttons used short links
Before networks shortened links automatically, long addresses ate into character limits and looked messy in posts. Share plugins added short link integrations, such as the MashShare ShortURLs add-on, which called the Bitly API with the site owner's token and stored the result. The documentation article on getting a Bitly access token was the most linked page on this domain's old knowledge base, so this guide covers the same task as it works now.
Get the token
Sign in
Log in to your Bitly account in a browser.
Open settings
Go to your account or profile settings. The token lives in a section named for the API or developer settings; the exact label has changed over the years.
Generate a token
Choose to generate an access token and confirm your password. Copy the token straight away; treat it like a password.
Paste it into your plugin
Open your sharing or short link plugin settings, paste the token in the Bitly field, and save.
Clear caches and test
Purge page caches, share a test post, and check that the link in the share dialog is the short version.
When short links fail
| Symptom | Likely cause | Fix |
|---|---|---|
| Long link still used | Token missing or pasted with a space | Paste again, save, clear caches |
| Works for old posts, not new | Monthly link quota reached on the plan | Check the plan's limits in the account |
| Errors after months of working | Token revoked or account password reset | Generate a new token |
| Slow pages | Plugin calls the API on page load | Use a plugin that stores links per post |
Do you still need short links?
Probably not for sharing. X wraps every link and counts it as 23 characters regardless of length. Facebook and LinkedIn show a preview card, not the raw address. Short links still help when you want click statistics per campaign or a branded domain, but that is a marketing choice, not something share buttons require.
Questions
Where do I find my Bitly access token?
In your Bitly account settings, under the API or developer section. Generate a token and confirm your password.
Why are my share buttons not using Bitly links?
Usually the token is missing, has a stray space, was revoked, or your plan's monthly limit was reached. Caches can also serve the old link.
Do I need short links for X?
No. X counts every link as 23 characters, whatever its length.
Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.
Related guides
- How to add social share buttons to WordPressAdd social share buttons to WordPress with a plugin, a block, or plain links in your theme. Placement, networks, counts and the checks to run afterwards.4 min read
- Click to tweet boxes: how to build them in WordPressBuild a click to tweet box in WordPress with a block or a simple link. Wording, the 280 character limit, how links are counted, and how to style the quote.3 min read
- Tracking shares and pageviews in analyticsTrack share button clicks as analytics events, tag shared links with campaign parameters carefully, and read shared traffic in referrer reports without cookies.3 min read