diff --git a/port/cli/client.go b/port/cli/client.go index a8474b8f..d2cd7db9 100644 --- a/port/cli/client.go +++ b/port/cli/client.go @@ -44,10 +44,12 @@ func New(baseURL string, opts ...Option) (*PortClient, error) { func (c *PortClient) Authenticate(ctx context.Context, clientID, clientSecret string) (string, error) { url := "v1/auth/access_token" resp, err := c.Client.R(). + SetBody(map[string]interface{}{ + "clientId": clientID, + "clientSecret": clientSecret, + }). SetContext(ctx). - SetQueryParam("client_id", clientID). - SetQueryParam("client_secret", clientSecret). - Get(url) + Post(url) if err != nil { return "", err }