ActiveCampaign

ActiveCampaign provides cloud-based marketing and sales automation software that has the features for email marketing, lead scoring, and web analytics. It’s a CRM platform that is associated with a live chat messaging platform for conducting great conversations. This platform also offers better marketing automation, list management, and higher deliverability features.

Authorization

Basic Auth

All requests to the API are authenticated by providing your API key. The API key should be provided as an HTTP header named Api-Token.

Header

curl -H "Api-Token: YOUR_TOKEN" https://account.api-us1.com/api/3/

Your API key can be found in your account on the Settings page under the "Developer" tab. Each user in your ActiveCampaign account has their own unique API key.

  • To conduct the Basic Auth you need to provide the additional request parameters client_id and client_secret.

  • The client ID and secret in BasicAuth format is provided in the HTTP header.

The basic auth configuration is a JSON object that contains the following properties.

Property

JSON Type

Required

Property

JSON Type

Required

type

string

yes

verify_url

string

yes

defined_fields

object

yes

The username/password fields is helpful for supplying BasicAuth credentials. In addition, this is the place to define the optional subdomain field. If the subdomain field is defined, the subdomain value becomes available to use throughout your configuration.

When specifying the BasicAuth credential fields, you must define both "username" and "password".

The following properties are used to describe how the defined fields should be presented to the user.

Property

JSON Type

Required

Property

JSON Type

Required

label

string

yes

placeholder

string

yes

help_text

string

yes

The label is the user-friendly value displayed next to the input. The placeholder can be suggestions or instructions that appear inside the input before a value is entered. The help_text is a description of the field displayed near the input and supports commonmark markdown syntax.

Key

Description

Example

Key

Description

Example

Client ID

A client ID is a unique eight-digit number generated by the ActiveCampaign to identify their clients.

 

Client Secret

Client Secret is a secret used by the OAuth Client to Authenticate to the Authorization Server.

 

Username

It’s a sequence of characters that identifies a user.

 

Password

A password is a secret data, typically a string of characters, used to confirm a user's identity.

 

Example:

{ "auth": { "my_basic_auth": { "type": "basic", "verify_url": "https://api.example.com/ping", "defined_fields": { "username": { "label": "Email", "placeholder": "Enter Email for Your Account", "help_text": "This is the email used to register your account" }, "password": { "label": "Secret", "placeholder": "Enter Your Account Secret/Password", "help_text": "If you don't know your password, you can request a reset here: https://account.example.com/forgot" } } } } }

 

For more details please visit: Basic auth

OAuth 2.0 

The OAuth2 configuration is a JSON object that contains the following properties.

Property

JSON Type

Required

Property

JSON Type

Required

type

string

yes

configuration

object

yes

defined_fields

object

no

To conduct the OAuth 2 configuration property is a JSON object that contains the following properties.

Property

JSON Type

Required

Property

JSON Type

Required

authorization_base_url

string

yes

client_id

string

yes

client_secret

string

yes

scopes

array

yes, use empty array if no scope is specified

token_request_body

string

no

token_url

string

yes

refresh_url

string

no

include_client_id

boolean

no

When a user creates the Active Champaign app, they must be sure to enter Sapper's OAuth callback URL - Sapper -as a Callback URL.

authorization_base_url

The authorization_base is the location where we will send the user to authorize access to your integration for their account on the service provider.

It is this URL that will confirm your client_id, and scopes on the service provider and prompt the user to give authorization.

client_id

The client_id should be given to you by the service for which you are creating the integration. The client_id acts as a public identifier for your integration.

Most service providers provide a unique, hard-to-guess string.

client_secret

The client_secret should be given to you by the service for which you are creating the integration. The client_secret is like your password for a service. It is a secret known only to your integration and the service provider.

Most service providers provide a large cryptographically-secure string.

scopes

A scope in OAuth terms specify exactly what access your application needs to have to a user's account for given service. It is important to note that scopes do not grant additional permissions beyond what the user already has within the service.

token_request_body

It is an optional parameter. If your OAuth server requires additional information as part of the token request, you can add that information here. If this field is not utilized, do not include it in the configuration.

token_url

Once a user has authorized your integration, the token_url will be used to obtain the OAuth access token.

refresh_url

The refresh_url is an optional parameter. This URL is used to refresh expired OAuth access tokens. Do not include this field in the configuration if you OAuth server doesn't support/require refreshing tokens.

include_client_id

It is an optional parameter to control where to include OAuth credentials when exchanging/refreshing access tokens with your OAuth server. This defaults to false.

OAuth client credentials in two standard ways when making requests to retrieve or refresh access tokens (via either token_url or refresh_url). The value for include_client_id should be set appropriately based on how your OAuth server is implemented.

Now, the user will have to configure OAuth 2.0 settings in Sapper. The user should create a new credential of type OAuth 2.0 - Authorization Code. 

  • OAuth server expects additional request parameters client_id and client_secret

  • OAuth server expects the client ID and secret in BasicAuth format in the HTTP header

Key

Description

Example

Key

Description

Example

Client ID

A client ID is a unique eight-digit number generated by the ActiveCampaign to identify their clients.

 

Client Secret

Client Secret is a secret used by the OAuth Client to Authenticate to the Authorization Server.

 

HTTP Header

An HTTP header is a field of an HTTP request or response that passes additional context and metadata about the request or response.

 

This optional section allows for the definition of a subdomain field. If the subdomain field is defined, the subdomain value becomes available to use throughout your configuration.

The following properties are used to describe how the defined fields should be presented to the user.

Property

JSON Type

Required

Property

JSON Type

Required

label

string

yes

placeholder

string

yes

help_text

string

yes

 

Example:

{ "auth": { "my_oauth2_configuration": { "type": "oauth2", "configuration": { "authorization_base_url": "https://api.example.com/oauth2/authorize", "client_id": "woef2qo3hefawWEWrfh2qe21wlvdflkefnqs", "client_secret": "[insert your secret here]", "scopes": [ "insert_scope_here_if_needed" ], "token_url": "https://api.example.com/oauth/token", "refresh_url": "https://api.example.com/oauth/authorize" } } } }

For more details please visit: Active Champaign OAuth 2.0

 

Active Champaign Connections

Active Champaign Basic Connection

Input 

Key 

Description

Example 

Select application

application

Select ActiveCampaign application

 ActiveCampaign

Connection type

connection type

Select the type of connection.

REST

Rest connection type

Rest Connection Type

Select the Basic connection type

Basic

Connection name

name

Provide a name for the connection.

ActiveCampaign

Connection description

description

Provide a description for the connection.

 

Host name

host 

Provide a string value for the URL of the user's ActiveCampaign account.

 

Username

username

Provide a valid username for the given ActiveCampaign account.

exampleUser 

Password

password 

Provide a password to authenticate all requests with. Cloud users need to generate an API token for this value. 

exampleSecurePassword 

Header field

header

Provide the path of the endpoint for authentication.

Authorization

Header prefix header

header prefix

Select the header prefix -
Basic, Bearer, Token, None

 

Active Champaign Oauth 2.0 Connection

 

Input 

Key 

Description

Example

Select application

application

Select ActiveCampaign application

 

Connection type

connection type

Select the type of connection.

 REST

REST connection type

rest connection type

Select the type of REST connection.

 OAuth2.0

Connection name

name

Provide a name for the connection.

 ActiveCampaign connection

Connection description

description

Provide a description for the connection.

 

Host name

host 

Provide a string value for the URL of the user's ActiveCampaign account.

 

Grant type

grant type

Provide the grant type - authorization code, password, client credentials.

 

Actions

Get Campaigns

Get Campaigns for ActiveCampaign| key: getCampaigns

 

 

 

 


Create Contact

Create Contact in ActiveCampaign | key: createContact

 

 

Key

Description

Example

Key

Description

Example

Email

Provide the email id for creating contact.

sample@gmail.com

First Name

Provide the first name of the individual for creating contact.

John

Last Name

Provide the last name of the individual for creating contact.

Smith

Phone

Add the phone no for contact creation.

(555) 555-1234

FieldValues

The value of a field is a string of bytes, consisting of all bytes in the field after the first colon.

 


Get Contacts

Get Contact for ActiveCampaign | key: getContacts