15

I'm trying to write a program to upload an image to imgur and return the url. I want to start trying to play around with the api, but to register for my client id, one of the required fields is the "Authorization callback url." The description says "The callback URL is used to determine where Imgur redirects the user after they authorize your access request..."

My program would be in the command line in java, or perhaps an android application. From what I understand (which is probably wrong), this would be useful for a web application, but for general use of the api, doesn't seem to help with anything. Especially if I'm working in the command line. Is there perhaps a "default" url or something I can put in? Or am I misunderstanding the purpose of the callback url?

user2816570
  • 317
  • 1
  • 4
  • 13

1 Answers1

32

Your definition of the callback URL is correct. Some applications, such as a CLI, don't need a callback URL, and imgur allows you to not provide one. When registering your client, choose the option OAuth 2 authorization without a callback URL under Authorization type.

It's been a long time and the asker has probably moved on, but I'm new when it comes to using APIs and I stumbled on this question looking for the same answer. Hopefully, this reply will help you.

identicon
  • 837
  • 9
  • 19
  • Will the token "OAuth 2 authorization without a callback URL" expire ? or it's forever ? i know that they return expires in , but does it or i have to call refresh token. – AaoIi Mar 04 '21 at 13:50