-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kutt Integration with ShareX #67
Comments
ShareX custom uploader support can supply arguments either as multipart/form-data or url query. But Kutt API requires them as JSON data therefore it not gonna work like this: {
"DestinationType": "URLShortener",
"RequestURL": "https://kutt.it/api/url/submit",
"Arguments": {
"target": "$input$"
},
"Headers": {
"X-API-Key": "YOUR API KEY HERE"
}
} |
Kutt technically supports urlencoded POST data as well (
Closing for now! |
@Jaex how to make it work? Any solution? |
I got this working with Kutt behind an NGINX reverse proxy by modifying the location block to add the headers and elements that ShareX doesn't support. NGINX config:
ShareX URL Shortener config:
|
Reopening the issue because I might add support for URL query in the future. |
Any update. We are using kutt for our team but without shareX support we are not doing day to day sharing. |
@nightah but how to make it work with custom domain? We are running self hosted Kutt and using with custom domain behind a nGinx Proxy. |
@xianx: The configuration I provided above is for exactly that type of a scenario, a self-hosted kutt behind an nginx reverse proxy. This is the relevant location block you need to include within your nginx configuration:
Obviously replacing your proxy_pass to be whatever the location of your self-hosted Kutt instance, you probably already have a variant of the proxy.conf or headers you apply to the standard reverse proxy of the kutt instance, make sure that's included too. Finally you need to configure ShareX Custom URL shortener with the following config:
Replace your RequestURL with whatever the location of your Custom Kutt instance and also replace your X-API-Key with your relevant API key. |
@xianx what's the proxy.conf though? This? |
@nightah @poeti8 After adding nginx rules ShareX is working but kutt web interface is showing error and not making the url short. When user is logged-in its showing "No target has been provided." and when not logged-in showing "reCAPTCHA is not valid. Try again." You can see this video for clarity https://techtun.es/xPEJ5e You can also try by yourself by visiting https://techtun.es/ url. Below is my full nginx configuration file. (Some text has been replace with sudo text for security)
How to make it work both for ShareX and Kutt? Thanks in advance. |
Didn't really think about the frontend app because I don't particularly use it.
Make sure to change your ShareX config to this:
|
Thank you @xianx. It works fine for me. Closing the issue. |
@poeti8 in wiki there should be hint that one need to setup Kutt behind an NGINX reverse proxy else it will not be work now as kutt do not have support for URL query to work with ShareX now. It will be added in next version but one can setup their own Kutt behind an NGINX reverse proxy and use the proxy configuration on nginx. Thanks. |
@nightah now working both on both front-end and ShareX. Thanks a lot. |
@Jaex I'd be happy to test but there's been no release since you added this. Let me know when it is and I'll give it a try. |
You can test it like this: https://getsharex.com/docs/dev-builds |
@Jaex Does this mean ShareX now supports |
ShareX supports, custom uploaders not. |
same problem as @DananFlander if anyone can help us please :D |
Without be able to test it I can't implement it. |
What do you need to be able to test it ? |
@Jaex you can sign up and set domain in settings. Also Kutt now uses API v2: https://docs.kutt.it, so please use this one since v1 is deprecated. |
I can't scroll that docs page, it keep scrolling to top automatically. (Chrome 84.0.4147.105) |
Video showing the issue: https://jaex.getsharex.com/2020/07/zukKAvCJLv.mp4 |
I see, seems like redoc has issues. Can you use another browser for the time being? |
I implemented API v2 now but request fails:
|
Can you send your request body here? |
{"target":"https://jaex.getsharex.com/2020/07/Tpd0TsJi3z.png","password":null,"customurl":null,"reuse":false,"domain":null} |
API v2 diff: ShareX/ShareX@f685dd1 |
Updated the server. Now |
Now it gives:
|
Seems like you're sending empty string instead of null. I updated the API again to allow empty string as well. Try now. |
Neither from web UI or API I can't make Kutt return custom domain which starts with |
Actually by default setting values are null but after edit password from UI then that value becomes empty string. |
yes custom domain is |
But if I edit URL and add |
It's because you're using subdomain and hosting and handling SSL certs. Most domains in Kutt don't have certs except a few I manually added. |
If I didn't handle SSL certs for my own domain then why would I want to use |
I am not sure what's your point either. In Kutt, normal links -> |
By the way |
Thanks, added now. |
Hello,
I am trying to integrate Kutt https://github.com/thedevs-network/kutt#api with shareX with Custom Short URL https://github.com/ShareX/CustomUploaders like Yourls https://github.com/ShareX/CustomUploaders/blob/master/yourls.org.sxcu
but could not figure out how to do that and what to enter which field on Custom ShortURL making interface see the screenshot https://zdrive.techtunes.com.bd/s/JYr9qcJWk2orPC3
I have also generate API key and passed the value as Header Value of X-API-Key see the screenshot https://zdrive.techtunes.com.bd/s/N2r3bF3k6XD78PS
In debug window its showing {"error":"No target has been provided."}
https://zdrive.techtunes.com.bd/s/4MeEReQrd2TP9cX
How to integrate Kutt with ShareX properly?
The text was updated successfully, but these errors were encountered: