Dropbox library (LC 9) - does dropboxGetCurrentAccount work?

Mike Kerner MikeKerner at roadrunner.com
Wed Oct 11 06:22:23 EDT 2017


oh geez, I read your command wrong - you're right - you're using
dropboxGetCurrentAccount, not dropboxGetAccount.

Yes, I'm getting the same error, now.  I'll dive into the code and see if I
can see what's going on.

As far as getting the account_id, for those times when you need it, I would
download the dropboxapi_v2 project (
https://github.com/macMikey/dropboxapi_v2).  Click on the "get started"
checkbox.  There are instructions on how to extract the account_id once you
have the oauth2 token.



On Wed, Oct 11, 2017 at 3:05 AM, Ben Rubinstein via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Hi Mike,
>
> Thanks for checking. According to the Dictionary, dropboxGetCurrentAccount
> only takes one parameter
>         dropboxGetCurrentAccount pAccessToken, [pCallback]
>
> if it's supposed to take two, that would explain the 400 error! But how
> does one obtain the account_id in the first place?
>
> I'm really only wanting to make this call because it looked liked the
> cheapest way to find out if the app has a valid token for Dropobox; I can
> either display the account it's logged in to, or a button offering to log
> in. Is there another way?
>
> Many thanks,
>
> Ben
>
>
> On 11/10/2017 01:49, Mike Kerner via use-livecode wrote:
>
>> It works for me in both 8 and 9.
>> The only way I get error 400 is if I enclose the arguments in parenthesis
>> (which tells LC that all of that goodness goes into the first parameter)
>> Remember, this is a command, not a function, so the arguments are not
>> enclosed:
>>
>> dropboxGetCurrentAccount oauthToken, account_id
>> if the result is not empty then
>> answer the result
>> exit to top
>> else #the result is empty
>> answer it
>> end if #the result is not empty
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> 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."



More information about the use-livecode mailing list