As I said, the CURL command from the docs doesn't work. It already has a content-type header: https://docs.appdynamics.com/appd/24.x/24.12/en/extend-cisco-appdynamics/cisco-appdynamics-apis/api-clients#id-.APIClientsv24.10-GeneratetheTokenThroughtheOAuthAPIaccess-token-oauth-api Not even mentioning there's two different commands in the example, one with basic auth added. I've tried all combinations of my username, domain, API client and still getting 401. $ curl -i -X POST -H "Content-Type: application/x-www-form-urlencoded" "https://mothership2019052316285110.saas.appdynamics.com/controller/api/oauth/access_token" \
-d 'grant_type=client_credentials&client_id=EnterpriseTest@mothership2019052316285110&client_secret=<secret>'
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=UTF-8
Content-Length: 204
Connection: keep-alive
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
cache-control: must-revalidate,no-cache,no-store
last-modified: Tue, 28 Jan 2025 08:17:18 GMT
accept-ranges: bytes
x-envoy-upstream-service-time: 13
date: Mon, 03 Feb 2025 22:38:47 GMT
server: istio-envoy
x-envoy-decorator-operation: pdx-p-con-437-svc.pdx-p-con-437.svc.cluster.local:8079/*
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Unauthorized</title>
</head>
<body>
HTTP Error 401 Unauthorized
<p/>
This request requires HTTP authentication
</body>
</html>%
... View more