src/Http/SafeStreamHttpClient.php
public function getAuthToken() {
        try {
            $response = $this->client->request('GET', "authenticate/accessToken", ['headers' => [
                'x-api-client-id' => $this->clientId,
                'x-api-key' => $this->apiKey
            ]]);

            $this->authToken = json_decode($response->getBody())->token;

            return $this->authToken;
        } catch (GuzzleHttp\Exception\RequestException $e) {
            $this->handleExceptionResult($e);
        }
    }
public function getAuthToken() {
        try {
            $response = $this->client->request('GET', "authenticate/accessToken", ['headers' => [
                'x-api-client-id' => $this->clientId,
                'x-api-key' => $this->apiKey
            ]]);

            $this->authToken = json_decode($response->getBody())->token;

            return $this->authToken;
        } catch (GuzzleHttp\Exception\RequestException $e) {
            $this->handleExceptionResult($e);
        }
    }
public function getAuthToken ( ) { try { $ response = $ this -> client -> request ( 'GET' , "authenticate/accessToken" , [ 'headers' => [ 'x-api-client-id' => $ this -> clientId , 'x-api-key' => $ this -> apiKey ] ] ) ; $ this -> authToken = json_decode ( $ response -> getBody ( ) ) -> token ; return $ this -> authToken ; } catch ( GuzzleHttp \ Exception \ RequestException $ e ) { $ this -> handleExceptionResult ( $ e ) ; } }
Gets an authorization token using the clients API key. Most requests to the SafeStream API
require an authorization token.

@return mixed: The JSON decoded response
@throws SafeStreamHttpAuthException
@throws SafeStreamHttpBadRequestException
@throws SafeStreamHttpException
@throws SafeStreamHttpThrottleException
Gets an authorization token using the clients API key . Most requests to the SafeStream API require an authorization token .