GoGetSSL API Assistance

Hello!

This has become really frustrating for me. You have been supper helpful in the past, so I hope you can figure this one out for me as well :slight_smile:

I am trying to call the API to setup a “revalidate” button for my users. However, I keep getting the error “Fatal error: Uncaught Error: Call to undefined method GoGetSSLApi::revalidate() … Stack trace: #0 {main} thrown in … on line 16”.

If I change the call to one that I know works (Like DecodeCSR), it connects just fine, so I think the issue may be with how I am trying to call the function.

Anyways, here is attempt no1:

<?
	$data = [
    	'domain' => $_POST['domain']
    ];

    try {

        $apiClient = new GoGetSSLApi();
        $token = $apiClient->auth($SSLApi['api_username'], $SSLApi['api_password']);
        $revalidate = $apiClient->revalidate($data); //THIS IS LINE 16

        print_r($revalidate);

    } catch (Exception $e) {
        printf("%s: %s", get_class($e), $e->getMessage());
    }


?>

No2

<?
try {

        $apiClient = new GoGetSSLApi();
        $token = $apiClient->auth($SSLApi['api_username'], $SSLApi['api_password']);
        $revalidate = $apiClient->revalidate($_POST['domain']); //THIS IS LINE 16

        print_r($revalidate);

    } catch (Exception $e) {
        printf("%s: %s", get_class($e), $e->getMessage());
    }
?>

The so called documentation is located here.

Better docs are located here.

Thanks in advance!

It’s a stupid mistake, right?

and where do you include this API functions?

Thanks for the reply!

The code above also calls this script via a require statement. Now that I actually look at this script (Don’t know why I did not think to do that before), a revalidate call does not seem to exist (Or did I miss it?). However, GoGetSSL’s support desk tells me the problem is with my code, and that they can’t help me with that.

Maybe you have not the right version of the lib?

The weird thing is is that the GitHub link is the most updated one. But it seems that the GitHub link and the documentation don’t match.

Or am I missing something?