Greetings.
I am presently working though oAuth 2.0 for Fitbit, which is not as straightforward as one might think.
The Fitbit API wants the local browser (Safari in my case) to be able to be called from my application (and ShowURL works well for this) … but then provide a callback (with useful data) to the application when its task is complete.
That is my current area of difficulty - how does one get Safari to provide a callback to my app ?
You don’t. The callback they’re talking about is on a web server somewhere. It’s literally a url that they can call when they are done with some long operation. Since the Fitbit API is typically accessed from a web app of some kind, that’s usually not a problem.
If you work in a Mac, consider getting yourself a copy of Paw from LuckyMarmot. It’s a RestApi client which supports oauth and will give you curl code once you get the request working properly.