Hi @Bill.Youngman ,
Thank you for posting to the community.
First, could you please try curl command below to make sure your apiClientName and client_secret are correct?
https://docs.appdynamics.com/21.10/en/extend-appdynamics/appdynamics-apis/api-clients#APIClients-GeneratetheTokenThroughanAPI
curl -X POST -H “Content-Type: application/vnd.appd.cntrl+protobuf;v=1” “https://<controller address>/controller/api/oauth/access_token” -d ‘grant_type=client_credentials&client_id=<apiClientName>@<accountName>&client_secret=*AppDynamics Client Secret*"’
The curl command should return access_token.
Then, in your http_poller input, please include the header and body just like the curl command.
Currently, it includes grant_type, client_id, and client_secret in the headers, so they should be in the body.
In addition, Accept and Authorizations headers are not necessary for the REST API that generates the token.
Authorization header is necessary for other REST API that uses the generated token.
e.g.
urls => { AppDynamics => { method => post url => "https://*appdynamics-test-account*/controller/api/oauth/access_token" body => "grant_type=client_credentials&client_id=<apiClientName>@<accountName>&client_secret=*AppDynamics Client Secret*" headers => { "Content-Type" => "application/vnd.appd.cntrl+protobuf;v=1" } } }
Best Regards,
Hiroki
... View more