Documentation
AUTHORIZE WEBACCOUNT
usage
<AUTHORIZE>
<WEBACCOUNT ID="number"/>
</AUTHORIZE>
parameters
ID: the unique numerical identifier of the webaccount you want to authorize
Goes through the OAuth process of authorizing sushee to interact with a webservice API like twitter, dropbox, linkedin or any oauth based service.
The exact process proceeds as follows :
- check in what state (AUTHORIZATION_STATE) the webaccount is. If the webaccount is 'waiting', continue. If its in any other state, do nothing.
- contact the service (see requestTokenURL in OAuth process) and see if it's ready to receive the user. The webaccount is stated as 'requested'. A first TOKEN is saved to identify the authorization process
- redirect the user to the service (see authorizeURL in OAuth process). User should identify himself and grant sushee to use his account.
- the service redirects the user to the page having called the AUTHORIZE command. Sushee transparently saves a TOKEN and TOKEN_SECRET which will allow to use the service transparently from then without asking the user to identify himself anymore.
Customization of the ending page (the page executing the AUTHORIZE WEBACCOUNT command) is left to the developer.
Once authorized the developer can interact with the service using the CALL WEBACCOUNT command.
See also :
WEBACCOUNT
Describes an access to a distant WebAPI (Twitter, Dropbox, LinkedIn)
CALL WEBACCOUNT
Calls a webservice method
WEBAPI
Describes a webservice which offers a public API