Cargue el certificado SSL autofirmado en Telegram

Estoy haciendo telegram bot usando webhook en php. El problema es que el webhook no se configuró correctamente e idk cuál es el problema. mi código de setwebhook:

$ch = curl_init(API_URL);
try {
    $cert = new \CURLFile(SSL_KEY);
apiRequest('setWebhook', array('url' =>  WEBHOOK_URL , 'certificate' => $cert));
    echo "webhook set";
} catch (Exception $e) {
    echo "error";
}