PHP code example of globalxtreme / open-api

1. Go to this page and download the library: Download globalxtreme/open-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

globalxtreme / open-api example snippets


    'credentials' => [

        // Copy with the same name? "customer-support"
        'customer-support' => [
            'id' => env('OPEN_API_CUSTOMER_SUPPORT_ID', ''),
            'key' => env('OPEN_API_CUSTOMER_SUPPORT_KEY', '')
        ],

    ]
    

    OPEN_API_CUSTOMER_SUPPORT_ID=<client-id>
    OPEN_API_CUSTOMER_SUPPORT_KEY=<client-key>
    

    'clients' => [

        'CRM' => [
            'host' => env('CRM_HOST', ''), // Server host
            'client-id' => env('CRM_CLIENT_ID', ''),
            'client-name' => env('CRM_CLIENT_NAME', ''),
            'client-secret' => env('CRM_CLIENT_SECRET', ''),
        ],

    ]
    

    CRM_HOST=http://127.0.0.1/
    CRM_CLIENT_ID=<client-id>
    CRM_CLIENT_NAME=<client-name>
    CRM_CLIENT_SECRET=<client-public-key>
    
bash
    php artisan vendor:publish --provider="GlobalXtreme\OpenAPI\OpenAPIServiceProvider" 
    
bash
    php artisan open-api-credential customer-support