This package is still under construction (july 13th 2022).
Open Api are described in the Bouygues Telecom Developer Portal: https://developer.bouyguestelecom.fr
composer require bboxlab/mosel
- authenticator for app credentials Oauth flow
- check email address
- check iban
- check portability
First, install the package on your php application with composer.
Then, create a Sdk Mosel Object with a credentials and a mosel configuration.
$configuration = new Configuration();
[...]
$sdk = new Sdk('clientId', 'secretId', $configuration);
You can use a preexisting configuration, here for the default bt env configuration.
$sdk = new Sdk('clientId', 'secretId', new ConfigurationCreator()->createApConfig());
When sdk is set correctly, you can use it to fetch secured open api
$emailInput = new EmailInput();
$emailInput->setEmailAddress('example@email.com');
$response = $sdk->checkEmail($emailInput);
A Mosel Response object is returned with the app credentials token created as an object and the response given by Bt Api as an array.
You can use phpunit to launch the tests:
./vendor/bin/phpunit tests/