Trying to use OAuth2 for Dropbox in 9 DP 9

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to use OAuth2 for Dropbox in 9 DP 9

J. Landman Gay via use-livecode
I'm attempting to use the OAuth2 and Dropbox libraries in LC 9.0.0 (dp9).

(If I test the Dropbox functions with a temporary access token for my app
generated from the Dropbox api website, it's fine.)

When I try to use the Oauth2 command to implement this for users, I get a
sheet dialog with what I take to be a message from Dropbox,
        Invalid redirect_uri. It must exactly match one of
        the redirect URIs you've pre-configured for your app
        (including the path).

The redirect URI I have registered for my app is
        http://127.0.0.1:51051

where 51051 is the port number I've passed in the OAuth2 command.

(As a handy side effect, there's no way to close the sheet dialog...)

This is LC 9.0.0 DP 9, on Mac OS X 10.12.6. I've not yet tried on any other
platforms.

I'm using
        https://www.dropbox.com/oauth2/authorize
        https://api.dropboxapi.com/oauth2/token
as the pAuthURL and pTokenURL, respectively; with an empty pScopes parameter.

Is there an obvious thing I'm doing wrong?

TIA.

Ben

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Trying to use OAuth2 for Dropbox in 9 DP 9

J. Landman Gay via use-livecode

> On 10 Oct 2017, at 9:53 pm, Ben Rubinstein via use-livecode <[hidden email]> wrote:
>
> The redirect URI I have registered for my app is
> http://127.0.0.1:51051 <http://127.0.0.1:51051/>
Add a trailing slash http://127.0.0.1:51051/ <http://127.0.0.1:51051/>

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Trying to use OAuth2 for Dropbox in 9 DP 9

J. Landman Gay via use-livecode
Also, if you're migrating from the phx_dropbox library, if you're
interacting with the base directory, you have to include the slash.

On Tue, Oct 10, 2017 at 7:28 AM, Monte Goulding via use-livecode <
[hidden email]> wrote:

>
> > On 10 Oct 2017, at 9:53 pm, Ben Rubinstein via use-livecode <
> [hidden email]> wrote:
> >
> > The redirect URI I have registered for my app is
> >       http://127.0.0.1:51051 <http://127.0.0.1:51051/>
> Add a trailing slash http://127.0.0.1:51051/ <http://127.0.0.1:51051/>
>
> Cheers
>
> Monte
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Trying to use OAuth2 for Dropbox in 9 DP 9

J. Landman Gay via use-livecode
Thanks both, just the ticket!

On 10/10/2017 13:25, Mike Kerner via use-livecode wrote:

> Also, if you're migrating from the phx_dropbox library, if you're
> interacting with the base directory, you have to include the slash.
>
> On Tue, Oct 10, 2017 at 7:28 AM, Monte Goulding via use-livecode <
> [hidden email]> wrote:
>
>>
>>> On 10 Oct 2017, at 9:53 pm, Ben Rubinstein via use-livecode <
>> [hidden email]> wrote:
>>>
>>> The redirect URI I have registered for my app is
>>>        http://127.0.0.1:51051 <http://127.0.0.1:51051/>
>> Add a trailing slash http://127.0.0.1:51051/ <http://127.0.0.1:51051/>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode