Remove my application from user with Dropbox API v2 - dropbox

I'm creating a Dropbox application which uses a webhook to get the file's updates.
When a user uses my app, I receive notification on my webhook URL. Perfect.
But if the user no longer wants to use my app, and removes the Dropbox link from my site... How can I remove my app from the Dropbox user's account to not receive calls anymore on my webhook URL?

The user can unlink an app from their account via the "Apps linked" section of their account security page:
https://www.dropbox.com/account/security
This will stop webhook notifications for that user from being sent to the app.
There isn't a way for the app to do this programmatically though. The Dropbox API only provides a way to revoke access tokens, but not a way to completely unlink the app from the account. We'll consider this a feature request for that though.

Related

Accessing own Dropbox storage from an application

I would very much like to enable users of my app to backup some of app data on their own Dropbox. I would like to direct users to login to their Dropbox account with their email and password and then the app would generate and store a file there without users having do anything on their own.
Is this possible?
I wouldn't want users to have to go to Dropbox App Console and then Create App and then fill in all the options and then copy the access token and paste in my app manually. That would repel a lot them.
I haven't seen anything in the docs suggesting that programmatic access to an account without an app created in the Console and generated access token is possible? Did I miss something?
Yes, this is possible. You as the developer would register the app once, and implement the Dropbox OAuth app authorization flow in your app to allow your end-users to then connect your app to their accounts.
You may want to check out the following guides:
https://www.dropbox.com/developers/reference/getting-started
https://developers.dropbox.com/oauth-guide
https://developers.dropbox.com/dbx-file-access-guide

Add dropbox webhook by code

We're exploring dropbox api reference. Concretly, we're exploring webhook possibilities.
We're not quite to know how to specify a webhook url by code.
We are lokking for a way to add this webhook url avoiding user has to do it manually.
I hope I've explained so well.
It's not possible to programmatically register a Dropbox webhook URI. We'll consider it a feature request.
Developers should register their webhook URI(s) manually via the App Console. Those webhook URIs will stay registered and will be used for all users connected to the app.

Twitter API: allow authenticated user to post tweets on another user's behalf

Twitter API allows to update "the authenticating user’s current status", as explained in the documentation page.
What I'd like to achieve instead is to update another user's current status. Consider a magazine's twitter account. I'd like different people to be able to update the magazine's status. Tweetdeck allows this, but it also allows a whole lot of other things like access to Direct Messages. I only want to provide certain authenticated users an interface (similar to Twitter's post-a-tweet interface) to post status and images to the shared account.
I could not find a simple explanation of how to use Twitter API to achieve the above functionality. Could someone please help?
If you have an app that implements the status update API and it is delivered to different people and they authorize the app with the magazine's twitter account, then the app will update that status. I can show an example also with code if this is what you're asking. However the main point is that, once a user has authorized the app, she/he doesn't need to be connected with the shared login any longer because the app will do that on the magazine's behalf.
BTW, similar question here: Twitter API: post on behalf of whom?
Edit
Just to summarize the comments:
The standard OAuth authentication requires the following main steps
1) to develop an app (registered with OAuth consumer key and secret) that implements the API update status 2) to install and authorize the app: during this step the onwer will be requested to enter the credentials of the passive account in a Twitter link opened with the browser, 3) then - after a fallback - the app will store the access token and any user of the app will be able to update the status without login
Once you have developed an app that can post tweets on behalf of a passive twitter account using the standard OAuth, you could make that functionality available to the authenticated users of a website.

The use of FacebookAuthProvider in apps

I've been working with ServiceStack for quite some time now and i love it. But there is one thing i can't figure out.
How are app's (ios, android etc.) that are using my servicestack endpoints, suppose to use the facebook endpoint "/auth/facebook"?
When using this url "/auth/facebook" from the browser it works fine, but the response is html, and not an AuthResponse og something serializable.
Is this endpoint only to be used from websites with servicestack in the same solution?
The way that stuff works is by redirecting the user to Facebook with an API key that matches your app. The user then tells Facebook that your app is ok, and Facebook redirects them back. This can only be done via a browser. You really have two options to work around this:
Make the user authenticate with Facebook using a website and then authenticate your user with credentials from the app.
Use the built in iOS Facebook stuff and send the resulting auth tokens to an endpoint on your app, where you can save them for later use.
Edit, a bit more clarification:
Option 1
User Goes to your website
User Clicks on your Auth With Facebook button
User is sent your your Facebook endpoint set up in Service Stack
User is redirected by Service Stack to Facebook
User is redirected back to Service Stack from Facebook, with a token in the url
You save the token in your database and tell the user they can now user your app with Facebook.
Option 1.5
The same as Option 1 but instead of making the user go through their browser you create a UIWebView control and point it to your Facebook Auth endpoint. Then you listen for a response from your site that says the user is authenticated. I'm not a objective c, so I can't really get more detailed on how to do that.
Option 2
Use the iOS Facebook API and handle authentication as seen here.
POST the credentials to Service Stack via a Custom Endpoint
Save credentials in the db, and use them in the future to make calls on behalf of the user.
Facebook Login requires a browser of some sort, because Facebook's cookies must be passed along with a request to authorize your website. That is how Facebook knows which of it's users wants to authorize your site, and that they are the ones making the request.

Link app to dropbox

I have an app with a dropbox link capability. There is a button called link. Then a safari page is opened with dropbox, and you can link the app to your account. But since I want all the users to log in with my account, I didn't want to dysplay my email and passward on the app, but by preesing link, automatically the app is linked with my account, withought showing the passward, amd withought opening the dropbox link in safari. How can I do this?
Very bad idea. Users should use their own Dropbox account, otherwise you would possibly violate Dropbox's terms of service (you're not allowed to share your credentials) and, perhaps more importantly, any user would be able to delete or corrupt all other users' data.
The only way you could make your own Dropbox account accessible in the app, other than including your email address and password, would be to include an authorized OAuth token which could easily be extracted and abused by anyone who downloads your app.