Dropbox chooser with Oauth - ios

I am working on integrating dropbox with iOS application. I want to implement below functionality.
User can share his existing dropbox file with app.
If user modifies any of the files, i should able to fetch the updated file and notify app server.
Also these files are not app related ones. User can share any docs in his dropbox account with app
After going through API, i found that i can use dropbox chooser UI to share files. chooser is generating temporary URL which i can share with my server to extract the file from dropbox.
But to get the modified files, i have to integrate with OAuth permission to run delta query on dropbox account. Here i am struck with two parallel functionalities chooser and OAuth which seems not related to each other. Even while asking OAuth permission also, dropbox taking to web url to grant permission instead of showing already logged in user on iOS.
How do i verify both chooser account and OAuth granted account are same? How will i show dropbox chooser(of OAuth connected) when user wants to add any file to app?
Correct me if i am wrong in understanding dropbox API. Also let me know if i have to provide more details.

Related

How to request a user to authorize an app to access a Google Drive file using the API

I have a web application and a Google Docs add-on that work together. The Docs add-on passes the web application the Google Drive file id of the Doc it's currently running in.
My web application needs to be able to be able to access/download the file content. I want the web application to use the drive.file scope, so that would require the user to authorize the web application access to the file in Google Drive.
I haven't found any APIs which let me request the user authorize the web app permission to a known file id. I could use the File Picker API, but then the user has to find the file in their Drive (annoying user experience given we already know the file and prone to errors).
Is there any way we can just redirect the user to a Google Drive URL where it asks them to confirm they want to open the file with my web app? Or to preselect the file in the File Picker?
I don't think you completely understand how scopes work.
The is no way to request permission for just a single file id. Scopes are all or nothing. If you have read only access then you have read only access to all of the files on the users drive account. Same for write access.
Now lets look at Scopes#Drive
https://www.googleapis.com/auth/drive.file See, edit, create, and delete only the specific Google Drive files you use with this app
If you request authorization of the user using the drive.file scope. It will allow your application to create files on the users drive account, and access those files which your application created and only those files.
So there is no way to get access to only a single file on a users drive account. If you want access to a file on the users account that wasn't created by your app then your going to have to use drive.readonly or drive. Depending upon if you want read or write access.

Getting Download URL for Firebase Storage Files

I have a mobile app and it requires Firebase sign-up to backup / restore custom user data in Firebase. I am wondering if authorised user can get somehow the url of his own storage file and download it to his computer.
If a user is authorized to access a specific file, that user is authorized to access that file using any means. It doesn't matter whether that is through your app or through another app or API.
There is no way to limit access to the user's files to only your app.

iOS: Upload multiple files using Dropbox

All that I have researched integrating Dropbox iOS SDK requires logging in to authenticate/authenticate a user.
But this is what I want to accomplish
Use only one user account. (Without authorization)
Create a random public folder(in same account) and upload files to that folder.
Get the folder link.
It's basically sending generated files from the app to an account.
How can I possibly do this?
The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons.
For example, any user who extracts the access token from your app will be able to read every file in the Dropbox account, delete everything, replace it, etc.
However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/applications.)

Upload public file to dropbox from iOS App without auth

Am writing an iPhone App in which I want to upload a text file from the iOS App to somewhere & I thought of using dropbox for it. I will upload the file to my dropbox ID from the App (i.e. the user won't be required to authenticate with his/her dropbox credentials). Is this possible? Dropbox API (I even tried GDrive API) asks for auth ; how do I give my dropbox credentials through code & upload the file to my dropbox account?
You must need Auth,otherwise in which account the file gets uploaded??
I don't think there is any other means to accomplish this except through OAuth.
Please refer to this framework that enables your app to access files from Dropbox without having to worry about the complexities of implementing a file browser, OAuth, or managing uploads and storage.

What are the alternatives for file upload on ios safari?

I have a mobile web app/site and I would like the users to upload a word document to our site.
As safari on the iPhone is not able to upload files what are the alternatives?
I have seen http://code.google.com/p/iphone-photo-picker/ however this is not photograph.
Is it documented anywhere that the Dropbox API, iCloud API or another API would allow selection a file from a user to copy to our servers?
Alternately is there another way for our iPhone users using safari?
No, iPhone does not offer input type file on it's browser (except for images or videos).
What i do is, have users to send file(s) via email to site and download it programmatically on the server side and assign it to user's account either according to email address or some sort of password in the email.
Investigation has shown that the drop box API for the user so select a via on the webpage using OAuth could be an option in the future.
However the dropbox api documentation at the time of writing says:
Web applications using the Dropbox API are currently not officially
supported.
iCloud API is in beta and only available to members of the iOS and Mac Developer Programs so I am unable to review it's possibilities.
Update: I have now found this site: http://filepicker.io that handles uploads from facebook and dropbox.

Resources