PHP code example of sofwar / trade-opskins-api

1. Go to this page and download the library: Download sofwar/trade-opskins-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/ */

    

sofwar / trade-opskins-api example snippets


$opskins = new Opskins();

$opskins = new Opskins('ACCESS_TOKEN');   
 
$opskins = new Opskins(');  
$opskins->setAccessToken('ACCESS_TOKEN'); 


$client_id = 'XXXXX';
$client_secret = 'XXXXXXXXXXXX';

$oauth = new \SofWar\Opskins\OpskinsOAuth($client_id, $client_secret);

$state = 'secret_state_code';

$browser_url = $oauth->getAuthorizeUrl($state, ['identity_basic', 'items']);


$client_id = 'XXXXX';
$client_secret = 'XXXXXXXXXXXX';

$oauth = new \SofWar\Opskins\OpskinsOAuth($client_id, $client_secret);

$response = $oauth->getAccessToken($_GET['code']);

$access_token = $response['access_token'];
text
pskins = new \SofWar\Opskins\Opskins();