How to setup the Dropbox API?

I have tried to set up the Dropbox API as I want my users to upload PDFs to their respective Dropbox account. This is what I’ve done:


However I keep getting an error. When I try initialise the call in the API connector, I get this error:

And when i try “log into Dropbox in developer mode”, I get this error message:

Inkederror_LI

Can someone please advise on what I can do to get this working?

2 Likes

@leonidas.petrou4

Did you ever get this to work?

I can get it working but stuck on the user profile endpoint as Dropbox uses the POST method instead of GET for the current profile endpoint: https://api.dropboxapi.com/2/users/get_current_account

Hi @makingapps, I managed to get it to work in Postman so i figured it might be a bug with Bubble. So I submitted a bug report. They replied saying:

“The API Connector currently doesn’t support sending a POST when auth is set to user-agent flow. I’ve shared your feature request with our engineering team. They will evaluate this request and get back shortly.”

So it is a problem on Bubble’s side. I hope they can fix this because not allowing POST calls with user-agent flow is a major limitation on Bubble’s capabilities.

I will keep you updated when they reply.

The first thing is that you didn’t set the “dev” fields App ID and Secret (you can use the same one).

Hi @Jici, I did add the keys in the dev fields too. Then we get the error as @makingapps mentioned where the user profile endpoint uses POST instead of GET that according to the Bubble team, the API Connector doesn’t support.

Yes I saw that. The issue is that all call, including initial one to get user information, use a POST request.

Did you tried this plugin? https://bubble.io/plugin/dropbox-v2-1543169685024x571194097926930400

Also, you can try the app authentication instead if you don’t really need user to login (just have access to your own dropbox account)

Thanks for your reply. Unfortunately that plugin is for a single Dropbox account, whereas I need users to upload files to their own respective Dropbox accounts.

I understand. So the App auth will not work for you too

Unfortunately not, will need User Auth.

Really? User-agent flow doesn’t allow POST? That’s crazy, how are we meant to integrate, I’ve just spent the last 2 hours implementing Mailchimp with the great help of @lottemint.md and now I cant use the subscribe to list endpoint because it requires post using Oauth2?

@neerja @emmanuel please can you help here

1 Like

I think that the issue is not the the user agent flow (I mean all API call) doesn’t allow POST. This is just to get the user ID and email endpoint that it’s not allowed (normally it’s a GET request). This is a Bad API design from Dropbox. So When you authenticate with Dropbox, this will allow the App, but Bubble will not be able to store information about user and will not be able to make call with this authenticated user.

2 Likes

I know right, I really hope Bubble’s engineering team can add this functionality to the API Connector ASAP because clearly I’m not the only one stuck with this problem. @neerja @emmanuel this would be greatly appreciated.

The endpoint, which shares the data about the current authenticated user should be GET.

Such platforms as Dropbox, eBay, etc. using POST method. :frowning:

2 Likes

@lottemint.md Should be… but it is not. All call are POST.
https://blogs.dropbox.com/developers/2015/03/limitations-of-the-get-method-in-http/
This is (a bad) explanation of why they choose that way.

1 Like

I’m wondering if we can cheat by using x-http-method-override

Latest update from the Bubble team:

“I’ve posted your note to our engineering team, however, they have not gotten back to me yet. I will post to them again and let you know as soon as I hear from them. You can likely solve this on your end now by building a private plugin, which is essentially a javascript extension of your app / our platform.”

I will try build this plugin and will let you know if I get it working.

2 Likes

Keen to hear your solution

Try to upload through Javascript SDK instead of POST call.

How would I do that?

@leonidas.petrou4 Our engineering team is scoping this request. If this turns out to be a bigger project, a custom plugin might be the right approach but we’re happy to help.

4 Likes