ShowURL and Safari callbacks (for Fitbit)

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 ?

The relevant link is here:-

https://dev.fitbit.com/docs/oauth2/

http://tools.ietf.org/html/rfc6749#section-4.2

Regards,
Tony Barry

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.

Thanks Greg. I suspected as much. But good to hear from the people who actually do know.

I am able to provide a web URL using Xojo Cloud and handleSpecialURL. It works well. But the Fitbit docs are … odd.
Or maybe I am the one who is odd :slight_smile:

Now to discover how to make CURL produce the correctly formatted POST.

Regards,
Tony Barry

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.

Thank you Greg. I shall look it up.

Regards,
Tony Barry