Authentication

Access token B2B

Of Course, you can request access token B2B with :

<?php

use Otnansirk\SnapBI\Services\SnapBi;
...

$token = SnapBi::bca()->accessTokenB2b();

For other than Snap Bi::bca(), you can use the supported Bank Support list here.

Bearer Token B2B

You can use this method to make requests that require B2B access token authorization. You may only need this function if it is needed for api requests that require authorization b2b access token.

Parameters
Required
Description

token

NO

If not provided, the b2b token will be automatically requested from accessTokenB2b and set to the authorization header.

<?php

use Otnansirk\SnapBI\Services\SnapBi;
...

SnapBi::bca()->withTokenB2b();

// Or
// If you want to manually provide accessTokenB2b
$token = "1wdqwj21jr...";
SnapBi::bca()->withTokenB2b($token);

Last updated