Skip to content

Configuration ​

Environment ​

ini
ANIKEEN_CONSOLE_MODE=staging            # optional; production by default
ANIKEEN_CONSOLE_BASE_URL=               # optional, overrides the mode
ANIKEEN_CONSOLE_WEBHOOK_SECRET=whsec_…  # the signing secret of your webhook endpoint

Add to config/services.php (so it still works with php artisan config:cache):

php
'anikeen_console' => [
    'mode' => env('ANIKEEN_CONSOLE_MODE'),
    'base_url' => env('ANIKEEN_CONSOLE_BASE_URL'),
    'webhook_secret' => env('ANIKEEN_CONSOLE_WEBHOOK_SECRET'),
],

Modes ​

ModeBase URL
production (default)https://console.anikeen.com/api/v1
staginghttps://staging.console.anikeen.com/api/v1

Staging needs staging tokens

Use ANIKEEN_ID_MODE=staging together with ANIKEEN_CONSOLE_MODE=staging: the staging Console only accepts tokens of staging Anikeen ID.

Token refresh ​

The token refresh uses anikeen/id's configuration (services.anikeen.client_id / client_secret) and the token fields on your user model - anikeen_id_access_token and anikeen_id_refresh_token by default. If your columns are named differently, tell anikeen/id in your AppServiceProvider:

php
use Anikeen\Id\AnikeenId;

public function boot(): void
{
    AnikeenId::useAccessTokenField('my_access_token');
    AnikeenId::useRefreshTokenField('my_refresh_token');
}

How the refresh works is described under Usage → Tokens.

Anikeen Console documentation