markasoftware/anypaste

Upload under specific Imgur account

Jacksaur opened this issue · 3 comments

I like to have all my uploaded images collected under a single account such that I can find older uploads quickly, and easily delete images that I no longer want hosted online.

I see that you can upload to Imgur with your own Client ID, but couldn't figure out whether this would also let me upload to a specific account I own. If not, are there any plans for this functionality in future?

This isn't supported at the moment. Looking at the Imgur API docs it doesn't seem too hard to implement using their "pin" style oauth2 authentication. It would be a bit annoying for the user because the oauth2 tokens expire after a month.

Ouch, yeah that certainly would get irritating.

Though ShareX somehow seems to work without reverification, but I know no nothing of code to understand how. Far as I can tell, it's requesting the same type of auth as the URL ends in response_type=pin.

It is possible to use a "refresh token" to automatically get a new oauth2 token. But it just makes the implementation more complicated, because then Anypaste needs to store the temporary oauth2 tokens somewhere. Presently, Anypaste doesn't need to "store" anything between runs, which would be broken by a refresh token implementation.

Something I need to look into: Can we refresh a new oauth2 token every time we make a request? Then we'd only need to store the refresh token.