Sophos Intellix Authenticate API Error trying to Authenticate

146 Views Asked by At

I am trying to authenticate to the sophos intellix authenticate api:

curl --location --request POST 'https://api.labs.sophos.com​/oauth2​/token' 
--header 'Content-Type: application/json;charset=UTF-8' 
--header 'Authorization: Basic {encoded key:secret}' 
--data-raw 'grant_type=client_credentials

I am receiving this response:

400 ERROR The request could not be satisfied.

Bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.

If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront) Request ID: cbA_F5avox5aIXvXdc91LFbn0PylJY4LfKqB_bYL7dfMsgCFElTArA==

What am I missing in the cURL request?

1

There are 1 best solutions below

0
c_Reg_c_Lark On

Oh gosh... had the wrong content type header value

--header 'Content-Type: application/x-www-form-urlencoded' 

The full curl request:

curl --location -X POST 'https://api.labs.sophos.com​/oauth2​/token' --header 'Content-Type: application/x-www-form-urlencoded' --header 'Authorization: Basic {encoded key:secret}' --data-raw 'grant_type=client_credentials' -i