iOS Question B4i with Dropbox?

mtechteam

Member
Licensed User
Longtime User
I see a post that notes iDropBoxSync, dated 2015, is no longer supported by Dropbox. I have a working program on B4a using Dropbox V2 library, but I am unable to find anything on the forum for B4i.
 

behnam_tr

Active Member
Licensed User
Longtime User
check this :
 
Upvote 0

mtechteam

Member
Licensed User
Longtime User
I put a simple project together from the code snippets I saw there, put my appkey and appsecret in there. When I ran it to get account info, it opened to a browser and reported the following: "scope": must be at most 0 characters, got 197.

Any ideas? Was there more setup that I missed? Minus the app key/secret, the project that I tried is attached.

(I did need to modify the Initialize to remove the last 2 parameters, apparently only B4J allows those.)

(One more: I needed to modify all calls to SubExists to include number of parameters, B4J doesn't need this. Most I set to 2)
 

Attachments

  • Project.zip
    9 KB · Views: 148
Last edited:
Upvote 0

behnam_tr

Active Member
Licensed User
Longtime User
you
I put a simple project together from the code snippets I saw there, put my appkey and appsecret in there. When I ran it to get account info, it opened to a browser and reported the following: "scope": must be at most 0 characters, got 197.

Any ideas? Was there more setup that I missed? Minus the app key/secret, the project that I tried is attached.

(I did need to modify the Initialize to remove the last 2 parameters, apparently only B4J allows those.)

(One more: I needed to modify all calls to SubExists to include number of parameters, B4J doesn't need this. Most I set to 2)

in dropbox developer panel :

Access token expiration : Short_lived

and check all options in scopes
 
Upvote 0

mtechteam

Member
Licensed User
Longtime User
Better.... Now I am getting:

Invalid redirect_uri. When response_type=code without PKCE, redirect_uri must start with "https://". unless it's a localhost URI.

For a B4i app, what should I put in there?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can probably use #UrlScheme for this. It will be simpler than running a small server.

 
Upvote 0

mtechteam

Member
Licensed User
Longtime User
I tried both suggestions and get the same message. For Erel's suggestion:

I put #UrlScheme: org.techteam.dropbox in the Project Attributes section of Main (I am using B4XPages)
set the BuildConfiguration to the same value and set the Redirect URI in the dropbox section to org.techteam.dropbox:/oath
 
Upvote 0

mtechteam

Member
Licensed User
Longtime User
It appears that the problem is that when using "response_type": "code" rather than response type of token, you must have an http (localhost) or https. I have gotten both of your examples to work now (Erel's on iOS with Google and bejnam_tr with his info on B4J) The B4J example works with http because it is using local host.

I do not know what I need to do to make Erel's example work with dropbox or to change the B4J example to use token instead of code for the response_type so it will work with the packagename on iOS and Dropbox

Google does not have the requirement that the URI must match what is stored on your account and that it must begin with http or https
 
Upvote 0
Top