kutt
kutt copied to clipboard
Android App
Is it be useful to build an android app for Kutt?
Not sure, when was the last time you shortened a link on your phone?
@trgwii I use bit.ly app all the time. Click the long url and it says bit.ly and it will automatically shorten and copy to clipboard in the background.
I liked the idea of having the kutt button alongside copy.
@poeti8 I can work on the app.
I liked the idea of having the kutt button alongside copy.
Me too, i think it's a good idea to have one!
@poeti8 But what about authentication?
I was thinking of forwarding them to the kutt endpoint via the browser and making them copy the generated api key and paste it in the app.
If there was an endpoint that returned the api key(if exist) on POST ing the id and password, it could've been easier.
Does it affect the security if such an endpoint exist ?
How does Bitly do it? I prefer to not create such an endpoint.
@poeti8 They use authentication
@abhijithvijayan What's the process? Everytime user wants to shorten the URL or only once?
@poeti8 After authentication, as from bit.ly, anyone can copy the long url and click on the bit.ly icon next to cut copy and it will auto shorten and copy the shortened url to clipboard in the background itself.
also opening the app provides option to shorten new urls.
All the shortened urls created with that account will list on the app.
@abhijithvijayan Ok, what's stopping us from implementing this?
@poeti8 The authentication and also the listing requires returning all the created urls back to the app via some api call.
I dont know if users will use the api key for the app considering the tedious login on browser and the api creation followup.
We already have an endpoint to return the list of URLs. Also logged in users can generate an API or see the existing one.
What else needs to be done? You need to be specific.
@poeti8 I guess as CORS is enabled, I can send POST request to the /api/auth/login endpoint for the login.
Maybe that's enough.
Let me try with an API client for testing.
@poeti8 Why is the login not successful? It works from browser but not from api client?
Also, what is the endpoint to get the generated api key if it exists? I guess it works only on passport session.
@abhijithvijayan send as JSON body.
@poeti8 The app will work like this
For login
sends a POST request to /api/auth/login
if success,
- gets api key (GET to
/api/auth/usersetting
)- if not exist
generate one (POST to
/api/auth/generateapikey
)
- if not exist
generate one (POST to
- also gets the url history (GET to
/api/url/geturls
)
On submission of long urls, it might be better to give the custom url option after once the url is shortened (like edit url option)
The only thing I am missing here is getting api key(or generating it) with the login token obtained after loggin in. Could you make it more clear?
The only thing I am missing here is getting api key(or generating it) with the login token obtained after loggin in.
When login you'll get a token, when got the token now you can call the other endpoints with the API key in the header of request: { headers: { 'X-API-KEY': 'samplekey' } }
@poeti8 what if the api key is not generated?
Edit: The token I get after logging in, is to be send in Authorization Header as a Bearer Token, for the subsequent requests, right? or is it in the query parameter?
Edit: The token I get after logging in, is to be send in Authorization Header as a Bearer Token, for the subsequent requests, right? or is it in the query parameter?
This is all in the Kutt readme. Send it as X-API-KEY
header.
What is the progress of kutt android app? A react native app can be build.
@xianx Yeah I was thinking of the same. Currently it is not started yet as I was busy with other projects.
Will start working on it soon. Thanks.
Any news ?
I havent had a chance to work on it. Sorry.
Just found Kutt which is exactly what I was looking for :)
I've started working on the android app. Feel free to follow progress here: https://github.com/atommarvel/shears-for-kutt
@atommarvel congrats and thank you a LOT for beginning this work !
I switched to another selfhosted url shortener only due to the lack of android app... i'll probably go back to kutt then
@abhijithvijayan / @MKRhere or any Kutt owner!
Question semi-related to this issue!
For the android app icon would yall prefer it to:
- use the Kutt logo
- incorporate the Kutt logo
- not use the Kutt logo at all
- you don't care
Also, feel free to assign this issue to me if you want :)
@poeti8 ^^
You can use the Kutt logo, but have a clear indication that this is not from Kutt developers (or mention "unofficial" somewhere). Repo description, marketplace description and "about app" section (if any) are good places.