-
Notifications
You must be signed in to change notification settings - Fork 12
Connection
MagnusSolution edited this page Nov 1, 2023
·
6 revisions
After installing the API, you can establish a connection with MagnusBilling.
To begin, it is essential to generate API credentials within the MagnusBilling interface. Navigate to the "Configuration" menu and select the "API" sub-menu.
Here, you have the option to create an API key for administrative purposes or assign one to any other user. The API key operates in alignment with user group permissions, ensuring that you will only gain access to modules and actions authorized for the user in question.
It is highly recommended to implement IP restrictions to enhance API security.
<?php
require_once "vendor/autoload.php";
use magnusbilling\api\magnusBilling;
$magnusBilling = new MagnusBilling('API KEY', 'SECRET KEY');
// Your MagnusBilling URL
$magnusBilling->public_url = "http://1.1.1.1/mbilling";