Software Archive
Read-only legacy content
17061 Diskussionen

Plugin to use Dropbox

Hamilton_Tenório_da_
Geschätzter Beitragender I
2.416Aufrufe

I need a plugin to save some files in Dropbox. I tried some of them with no success (fail to install, not recognized by XDK, fail to debug, etc.).

Is someone using this kind of plugin with success? Thanks.

0 Kudos
1 Lösung
Giselle_G_Intel
Mitarbeiter
2.416Aufrufe

Hamilton -

I was actually able to recreate your problem, and it seems that in order to authorize you have to write "code" in the first input section instead of "token". If you write token it will return unauthorized or will time out. Also, you need to modify the redirect link instead of saying oAuth2Callback it should read: oauth2Callback. Let me know if you need more help!

 

Lösung in ursprünglichem Beitrag anzeigen

15 Antworten
Giselle_G_Intel
Mitarbeiter
2.416Aufrufe

Are you trying to use the Dropbox API from the web services window?

Hamilton_Tenório_da_
Geschätzter Beitragender I
2.416Aufrufe

Giselle> no... I will take a look there. Maybe it can help me. Thanks.

Giselle_G_Intel
Mitarbeiter
2.416Aufrufe

Please let me know if that ends up working for you.

Hamilton_Tenório_da_
Geschätzter Beitragender I
2.416Aufrufe

Giselle> This web service seems to be a good tool. Anyway,  I tried to use but I couldn´t work. I don´t know why.

I supply my API and secret. The auth process is initiated:

tela autenticacao.jpg

but the only answer is always "unauthorized".

nao autorizado.jpg

 

Is there any tutorial or help about it?

Thanks again.

Stefan_L_
Einsteiger
2.416Aufrufe

Hey Hamilton,

i dont know if your resolve your Problem but i'm in same trouble. As far as i know you have to

1. disable Allow implicit grant in your App.
2. have to use as response_type: code
3. i must change the redirect_uri from: http://localhost:58889/http-services/api-explorer/iodocs/oAuth2Callback to http://localhost:58889/http-services/api-explorer/iodocs/oauth2Callback on both sides, in the Dropbox App and in the Service in XDK

After that settings i can try in Web Service Explorer without Problems.
But in my App nothing's working. :-(

I tested oAuth2 with Forsquare and it's all right. So i think the WebService Plugin in the Intel XDK is crap. And i didn't found a solution. Not in Google or on the Intel Side. Nothing.

It's a mess...

Hamilton_Tenório_da_
Geschätzter Beitragender I
2.416Aufrufe

Stefan> Thanks for the suggestion. I did it, but is still broked.

 

Intel Team> I made some more tests. It seems that the Dropbox Web Service in XDK is old. Look this error message attached. It invokes intel.xdk.services. It is valid? This error appears when I try to check my auth. 

 

PaulF_IntelCorp
Mitarbeiter
2.416Aufrufe

Hamilton -- I've asked our web services expert to take a look.

Giselle_G_Intel
Mitarbeiter
2.417Aufrufe

Hamilton -

I was actually able to recreate your problem, and it seems that in order to authorize you have to write "code" in the first input section instead of "token". If you write token it will return unauthorized or will time out. Also, you need to modify the redirect link instead of saying oAuth2Callback it should read: oauth2Callback. Let me know if you need more help!

 

Hamilton_Tenório_da_
Geschätzter Beitragender I
2.416Aufrufe

Giselle,

That´s it! It is working now. I can authenticate normally using the test of web service.

The "code" was ok. The problem was the URL. 

Now, next step is to understand the files/functions and how it works.

Thank you! 

(maybe I will have some questions in a short time....)

Stefan_L_
Einsteiger
2.416Aufrufe

Hi Hamilton,

thats exactly what i wrote to you in my Post on 10/04/2016. In test of web service this is functional.
But in the Project it did not work. In my Project i use then the Search Function but the resulting Array is empty.
In the test of web service the resulting array is as expected an fine (in example 2 entrys for files). Only in the Project it is empty :-(

Greetings, Stefan
 

Giselle_G_Intel
Mitarbeiter
2.416Aufrufe

Stefan -

You need to make sure that the implicit authenticate is still checked in dropbox - which I think you disabled. Leave all settings in dropbox as is (default) and just change the web redirect. Not sure what the root problem is, but I will talk to our webservices expert to figure out a more permanent solution.

 

Stefan_L_
Einsteiger
2.416Aufrufe

Hi Giselle

i checked all twice and you are right. I leave'd all at default except the redirect uri.
But anyway, when i test the webservices to make a DataBindung all worked well. I get the response i expected and after check some
entries i can create the DataBinding.
But in the App tested with AppPreview on my Phone or in the simulation where i linked the DataBinding to my ListViewEntry nothing works.

And now under 3619 it's getting one step harder. I cant't get an windows from Dropbox to login and grant access.
New Project, InAppBrowser Plugin, Twitter Bootstrap v3 and Angular JS.

I'm confused...

Hamilton_Tenório_da_
Geschätzter Beitragender I
2.416Aufrufe

After some more researchs, I found this: http://ourcodeworld.com/articles/read/149/how-to-use-dropbox-in-a-cordova-application

I am just testing now. I created a simple app using theses orientations and I could read all files of my Dropbox! It seems to be easier that webservice. 

Stefan_L_
Einsteiger
2.416Aufrufe

thank you, thank you, thank you

this method works perfekt. i can list, read and write files.
forget the webservice, this is the way that work

you are my hero
 

Giselle_G_Intel
Mitarbeiter
2.416Aufrufe

So glad you two were able to figure out the problem. It seems that Dropbox has recently changed the Oauth steps, which is why the authentication for our webservices methods are currently buggy. 

Hamilton- thank you for providing the link that helped you fix this problem. I will relay this information to our webservices expert in order to update the Oauth authentication step with the new information you'be provided.

Antworten