# jetformbuilder/3.6.6/modules/active-campaign/api/base-action.php

JetFormBuilder — Dynamic Blocks Form Builder, version 3.6.6. 44 lines.

- Page: https://pluginprobe.com/plugins/jetformbuilder/3.6.6/code/modules/active-campaign/api/base-action.php
- Raw: https://pluginprobe.com/plugins/jetformbuilder/3.6.6/raw/modules/active-campaign/api/base-action.php
- Modified: 2023-11-20T11:46:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetformbuilder/3.6.6/code/modules/active-campaign/api/base-action.php#L10-L20`.

```php
<?php


namespace JFB_Modules\Active_Campaign\Api;

use JFB_Modules\Gateways\Base_Gateway_Action;

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

abstract class Base_Action extends Base_Gateway_Action {

	protected $token;

	public function base_url(): string {
		return '{base}/api/3/';
	}

	public function set_base( string $url ): self {
		return $this->set_path(
			array(
				'base' => $url,
			)
		);
	}

	public function get_headers(): array {
		$headers = parent::get_headers();

		$headers['Api-Token'] = $this->token;

		return $headers;
	}

	public function set_token( string $token ): self {
		$this->token = $token;

		return $this;
	}

}

```
