public function makeAuthenticationCall()
    {
        $authResponse = $this->call('POST', [
            'grant_type' => 'client_credentials',
            'client_id' => $this->client->getClientID(),
            'client_secret' => $this->client->getClientSecret()
        ], false, ['Content-Type' => 'application/x-www-form-urlencoded'], false, false);

        if (empty($authResponse->getRaw()->access_token)) {
            throw new Exceptions\AuthenticationException;
        }

        return $authResponse;
    }
public function makeAuthenticationCall()
    {
        $authResponse = $this->call('POST', [
            'grant_type' => 'client_credentials',
            'client_id' => $this->client->getClientID(),
            'client_secret' => $this->client->getClientSecret()
        ], false, ['Content-Type' => 'application/x-www-form-urlencoded'], false, false);

        if (empty($authResponse->getRaw()->access_token)) {
            throw new Exceptions\AuthenticationException;
        }

        return $authResponse;
    }
public function makeAuthenticationCall ( ) { $ authResponse = $ this -> call ( 'POST' , [ 'grant_type' => 'client_credentials' , 'client_id' => $ this -> client -> getClientID ( ) , 'client_secret' => $ this -> client -> getClientSecret ( ) ] , false , [ 'Content-Type' => 'application/x-www-form-urlencoded' ] , false , false ) ; if ( empty ( $ authResponse -> getRaw ( ) -> access_token ) ) { throw new Exceptions \ AuthenticationException ; } return $ authResponse ; }
Get an access token from the API

@return Moltin\Response
@throws Exceptions\AuthenticationException
Get an access token from the API