In order to be able to automatically login a user into your application/service, you will need to obtain the user's access token first (or Single Sign On token, shortened as SSO token), then give that token to the user by appending it to the link to the application URL.
Obtaining the SSO token
In order to obtain a user's access token, you need to first authenticate as an admin user. To do so, you will need to provide admin credentials as well to our API.
An example of the URL that returns a user's token is (using all parameters):
Fields api_user and api_pass_h are needed to authenticate yourself as an admin (to gain access to user tokens). Field api_output tells our API to return the result in XML format (other formats are JSON and serialized), while field api_action tells our API that you are asking for a SSO token. Field sso_addr should contain an IP address of the visitor who will receive this token. Only that IP address will be able to login using that token. Field sso_user should contain the username of a user you wish to obtain the SSO token for. If you wish to authenticate that user, you can also provide a non-empty field sso_pass; in that case it will try to match the password as well. Field sso_duration sets the duration of the SSO token in minutes, and if it is not provided, it is set to 15 by default.
The system will return an array (or XML object in case XML output is requested) that will contain the following fields:
id - user's ID
username - user's username (that you provided)
token - SSO token
and all user permissions
Using the SSO token
A token returned can be used to login the visitor coming from IP address sso_addr as user sso_user, if they access the system in the next sso_duration minutes.
A token can be passed to any part of your ActiveCampaign application/service by appending it to the URL as _ssot variable.
An example of auto-login URL you would give your visitor would be:
You can find the example API connector in singlesignon.php file, located within your administration panel, on Integrations page. You can modify that file to include your install's URL and your admin access info and use it to give your visitors the ability to auto-login.