Installing the Bearer Agent generally only takes a few minutes. You will need an account on Bearer.sh to obtain your secret key.
To enable the Bearer Agent within your application, you'll need to:
Install the Agent and initialize it in your application.
Set up any optional configuration settings.
Open a terminal and install the agent into your project using Composer:
composer require bearer/php-agent
Now, open your application's main process file and initialize the Bearer agent at the core of your application:
require_once __DIR__ . '/vendor/autoload.php';\Bearer\Agent::init(['secretKey' => 'YOUR_BEARER_SECRET_KEY']);
Your Bearer Secret Key,
secretKey, can be found in the settings for your app on the Bearer Dashboard at Settings > Keys. Each application you have created in the Bearer Dashboard has its own unique key.
Now, you can start your application. All API calls using CURL will be monitored and available on your Bearer dashboard.
With the Agent set up, you can begin monitoring your APIs on the Bearer Dashboard. To learn more about the features available on the Dashboard and how to get started, explore our Get to Know the Dashboard documentation.
The Bearer agent communicates with Bearer servers through HTTPS. The Agent requires that your firewall allows outgoing connections to
config.bearer.sh with port 443 (HTTPS).
By default, the Agent sends to the full payload of each HTTP request (including both the request and the response) to Bearer. By default and for your own security, the
Authorization header is filtered and will not be shared with Bearer.
The agent offers more options to reduce the amount of sensitive information sent to Bearer. To learn more about how to sanitize specific parts of your data, see the Keep your Data Protected documentation.