begin_authenticate_user (POST)

Purpose

Begin the web-based user authentication process for a third-party service required by the application.


Input parameters

  • data: A JSON object with the following format:

    {
    "callbak":"http://www.botize.com/callback/myApp"
    }
    

  • callback: An URL where the authenticating service must redirect the user's browser once he has introduced his credentials or the service has otherwise authenticated the user.

Output data

A JSON object with this format:

{
"authentication_url":"http://www.theservice.com?...",
"temp_data_to_save":"..."
}


  • authentication_url: The URL of the web site where the user must supply his credentials for authentication. It must somehow have the callback parameter of the input data embedded.
  • temp_data_to_dave: Any data that the application needs to maintain during the authentication workflow. This data will be passed back to the end_authenticate_user command.

Notes

This command is invoked by Botize only when the user authentication mode for the application, as specified in the user_auth_mode element of the data returned by the get_app_info command, is “web”.

Botize allows the user to authenticate multiple times for the same task; authentication is performed separately for the trigger and the action but both must use the same authentication type and the same authentication service. If more than one authentication has been performed for the same task, the user can select which credentials to use from two lists (one for the trigger and one for the action) available in the task configuration page. The account names displayed in this list are the values returned in the user_id element by this command.

After invoking this command, Botize will redirect the user's browser to the authentication service URL provided in the authentication_url element of the output data, where the user will be able to supply credentials for the service. It is expected that the authentication service will in turn redirect the user's browser to the URL passed to the command in the callback element; once this has happened, Botize will invoke the end_authenticate_user command. See the User Authentication section for more details.