User will give permission through an api for "my site" to post on their account on their behalf


I have a site where my requirement is that users will give permission through api for “my site” to post on their account on their behalf . Is it possible if i store Api keys in my database and run a cron to post on my users profile .


Yes, this would be possible. You would have users authenticate your site/application via OAuth, resulting in you obtaining their access tokens – which you can then persist and leverage. The key is that the user is opting in to the specific actions you’ll be taking with their access token – if you’re posting on their behalf from a cron job, it should be in a way they anticipate and understand. It’s important to also make sure that you’re being polite with the API when working with cron jobs – it can be a bit tougher to implement things like exponential backoff when things go wrong.


Ok , thanks episod for your assistance . Let me try this and hope it wold be a success .