dub
dub copied to clipboard
[Feature] API support
One of the most useful things I'd find to have in Dub would be the possibility to CRUD links using an API, this way we could automate the creation using tools like Notion and others.
From my perspective, and I'm willing to implement it, is to have a settings page to create an API key that can be used to control the link managing.
Any thoughts about it?
Oh I love that! So to summarize, here's the user experience:
- User creates an account on Dub via https://app.dub.sh/register
- User gets their API key from https://app.dub.sh/settings
- User makes requests to the Dub API to create/edit dub.sh links via a third party app
Do we want this to be for dub.sh short links only or for custom domains as well?
Related issue: #30
I'd really want to be for all domains, since, in my case, I use dub with my custom domain, so having the possibility to streamline, for example, my newsletter link sharing (which is saved in notion) to automatically shorten the links with dub, then update the newsletter with them would be -> AWESOME <-
The feature itself is not that hard to implement, backend-wise, I'll do my best on the frontend, but I think I can show something working next week o/
@khaosdoctor sounds good! We'd wanna leverage some of next-auth's existing features to handle API authentication as well (preferably using a Authorization: Bearer xxxxx header.
I'm also planning to add a docs page too to document the API!
Any updates?
I'm making some decent progress on this, apologies for the delay, I got a bit distracted by the AI/ChatGPT hype haha
Aiming to launch the official Dub API in the first/second week of Jan 2023!
Thanks a lot, life happened here and I got several unplanned problems that came my way and I ended up not having enough time to implement the solution...
Sorry for annoying but, any update on this? :) I am planning on creating some bot to shorten links directly from Slack.
Also looking forward to this!
I'm waiting!
Sorry for the delay on this but I still very much intend to ship the official Dub API. I'm estimating to ship it by May but there are a few other features that take priority, so it might take another month or so. Will keep y'all posted! 🙏
Really looking forward to this as well!
I recently made a ChatGPT plugin that creates a functioning website and returns a shareable link.
I'm doing this with itty.bitty.sites, which are websites whose data is entirely contained in the URL. You can do quite a lot with compressing HTML/CSS/JS and appending it in the URL. With itty.bitty and the ChatGPT plugin, you can essentially create mini-websites on the fly simply by describing them.
The challenge is that these URLs tend to be quite long, so I want to build in a link shortener so that the link that gets returned is a short link like https://dub.sh/snake-game rather than a super long one like this: https://itty.bitty.site/Snake-Game/d/A%20simple%20snake%20game%20created%20using%20HTML,%20CSS,%20and%20JavaScript./f/%F0%9F%90%8D/#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KRoI8/LKAspBf1MG4XxU8QlKkMej3Yqoe+8jq6/fzuH6/5K3do=
Up!!
I believe that dub.sh is behind schedule on this feature, as it is an amazing link shortener with plenty of features, and they should want to include all the features in their API. Instead, they are only adding the basic link creation functionality with just three field options: the target link, the slug, and the project's domain or ID. This would already solve numerous integrations, and later on, we can implement other features in the API.
Any update on this? Link shortening through API is one of the most important parts for many businesses.
Totally agree with @atumas-bananamilk, a major point of a link shortener service is the integrations between other systems and the service. @steven-tey is it possible to get a time estimation for this? Not complaining, but we do need some realistic estimation (the other estimations in this threads are way off) to understand how we're gonna use the service moving forward.
I'm leaving my comment here because I won't be able to work on this anymore, I tried a few times back but I couldn't actually set the system locally here, so I stopped trying... But this is still a great feature if someone is able to do it.
@atumas-bananamilk @amitizle – apologies for the inaccurate estimations before, but this is definitely a top priority feature for Dub. Here's what we have planned:
- REST API
- Zapier integration
- Raycast integration
dubJS SDK
The current ETA for this feature is September 2023 – we're currently blocked by one other major update that we're shipping to Dub (rebranding to a different TLD 🫣🤫) but once that's done, we'll be full-steam ahead on the API! 🙏
If you're interested in the Dub API – please sign up on this form here!
@steven-tey We've moved on with short.io which has everything, including analytics through API. Keep me updated though, I really liked the simplicity and usability.
Will do! Planning to build out a short.io migrator soon as well to make things easier if you do decide to switch in the future (when Dub's API feature is live)! 😄
Edit: Short.io migrator is now live: https://dub.sh/help/article/migrating-from-short
Wondering if we're still looking at September ETA?
We want to move from short.io but waiting for API access.
@DawgZter yes, but it's probably going to be closer to the end of September!
Also planning to roll this out in stages so if you haven't already, feel free to sign up for the beta waitlist here!
Hi everybody ! Very very interested on migrating to dub.co with the future API.
I'be built a ChatGPT Plugin which short links and give possibility to have stats on these links. This plugin is managed with t.ly
But I really want to migrate on dub.co
So, I have some questions:
- It's possible to migrate (existing links and stats) from t.ly to dub.co ?
- Does API will offer possibility to pull stats of links ?
Thanks for all ! And for information, I had fill form to register on beta, I hope that I will be admit !
That's awesome to hear @martinez-hugo!
- It's possible to migrate (existing links and stats) from t.ly to dub.co?
If the link is a
t.lylink, that won't be possible. But if it's a custom domain, we can potentially build out at.lymigrator to help you move your links over :) - Does API will offer possibility to pull stats of links ? That's the plan eventually, but in v1 we'll only allow for fetching, creating, updating, and deleting links. Will need to think more about the economics / rate limits for pulling stats since that can get expensive if abused.
I'm 100% PRO-API!!
Please let me know if I can be of any assistance in testing this new feature. I'm a professional no-code developer using API's all around!
Thanks! 👍
Good news – we just launched the Dub API beta today (sneak peek), with an estimated General Availability (GA) date of mid-October 2023.
If you are interested in joining the beta, please sign up for the waitlist!
Will you be able to request metrics?=
@MrlolDev not for the first version of the API, but potentially in future versions!
Good news – we just quietly launched the public beta for Dub's API! Here are the docs: https://dub.co/docs
We're still planning to add a few more features to it before doing a public launch, more notably:
- Bulk link creation
- Tag creation & retrieval endpoints
- Zapier integration
Will close this issue for now, but feel free to try out the API and send us any feedback you have via the in-app chat, email ([email protected]), or by creating a new issue :)