source/AllegroRestApi.php
/**
     * Generates access token for application
     * @param   string  $clientId     Client ID
     * @param   string  $clientSecret Client secret
     * @return object
     */
Generates access token for application
@param   string  $clientId     Client ID
@param   string  $clientSecret Client secret
@return object
Generates access token for application @param string $clientId Client ID @param string $clientSecret Client secret @return object
public static function generateTokenForApplication( $clientId, $clientSecret )
    {
        $api = new AllegroRestApi(null, null);
        return $api->sendRequest( "https://allegro.pl/auth/oauth/token?grant_type=client_credentials", "GET",
            array(),
            array(
                'Authorization' => 'Basic ' . base64_encode("$clientId:$clientSecret")
            )
        );
    }
public static function generateTokenForApplication ( $ clientId , $ clientSecret ) { $ api = new AllegroRestApi ( null , null ) ; return $ api -> sendRequest ( " https://allegro.pl/auth/oauth/token?grant_type=client_credentials " , " GET " , array ( ) , array ( 'Authorization' => 'Basic ' . base64_encode ( " $ clientId : $ clientSecret " ) ) ) ; }
Generates access token for application
 @param   string  $clientId     Client ID
 @param   string  $clientSecret Client secret
 @return object
Generates access token for application @param string $clientId Client ID @param string $clientSecret Client secret @return object