private function tokenRequest($namespace, $parameters)
    {
        $client = new Client([
            'headers' => [
                'content-type' => 'application/x-www-form-urlencoded',
                'Authorization' => 'Basic '. base64_encode($this->clientId . ':' . $this->secret),
            ]
        ]);

        return $client->post(self::FITBIT_API_URL . $namespace . '?' . http_build_query($parameters));
    }
private function tokenRequest($namespace, $parameters)
    {
        $client = new Client([
            'headers' => [
                'content-type' => 'application/x-www-form-urlencoded',
                'Authorization' => 'Basic '. base64_encode($this->clientId . ':' . $this->secret),
            ]
        ]);

        return $client->post(self::FITBIT_API_URL . $namespace . '?' . http_build_query($parameters));
    }
private function tokenRequest ( $ namespace , $ parameters ) { $ client = new Client ( [ 'headers' => [ 'content-type' => 'application/x-www-form-urlencoded' , 'Authorization' => 'Basic ' . base64_encode ( $ this -> clientId . ':' . $ this -> secret ) , ] ] ) ; return $ client -> post ( self :: FITBIT_API_URL . $ namespace . '?' . http_build_query ( $ parameters ) ) ; }
Request token action.

@param string $namespace namespace of request
@param array $parameters request parameters
@return ResponseInterface response from Fitbit API
Request token action .