service/TokenService.php
public static function get(Context $context, $number)
    {
        CheckUtils::paramNotEmpty($number, Constants::NUMBER);

        $response = NetLicensingService::getInstance()
            ->get($context, Constants::TOKEN_ENDPOINT_PATH . '/' . $number);

        $token = null;

        if (!empty($response->items->item[0])) {
            $token = ItemToTokenConverter::convert($response->items->item[0]);
            $token->exists = true;
        }

        return $token;
    }
public static function get(Context $context, $number)
    {
        CheckUtils::paramNotEmpty($number, Constants::NUMBER);

        $response = NetLicensingService::getInstance()
            ->get($context, Constants::TOKEN_ENDPOINT_PATH . '/' . $number);

        $token = null;

        if (!empty($response->items->item[0])) {
            $token = ItemToTokenConverter::convert($response->items->item[0]);
            $token->exists = true;
        }

        return $token;
    }
Gets token by its number..See NetLicensingAPI for details:
https://www.labs64.de/conluence/display/NLICPUB/Token+Services#TokenServices-Gettoken

determines the vendor on whose behalf the call is performed
@param Context $context

the token number
@param $number

return the token
@return Token|null
@throws MalformedArgumentsException
@throws \ErrorException
@throws RestException