Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
02-20-2023 11:10 PM
I follow up on this doc to generate tokens via API but I didn't receive any response from the server.
https://docs.appdynamics.com/appd/4.5.x/en/extend-appdynamics/appdynamics-apis/api-clients#APIClient...
the curl like below:
curl -X POST -H "Content-Type: application/vnd.appd.cntrl+protobuf;v=1" "https://(accountName).saas.appdynamics.com/controller/api/oauth/access_token" -d 'grant_type=client_credentials&client_id=(username)@(accountName)&client_secret=(clientsecret)'
Please help me!
Solved! Go to Solution.
02-22-2023 02:09 AM
@Mario.Morelli
Sorry If I interrupt you but could you confirm for me about the trials controller can not get tokens via API? If you can not so Can you please give me the contact of people who can answer my question above?
Thanks.
02-22-2023 10:03 AM
Hi @Tran.Vinh,
I'm also trying to figure this out. I'll report back when I get an answer.
Thanks,
Ryan, Cisco AppDynamics Community Manager
Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
Check out Observabiity in Action
new deep dive videos weekly in the Knowledge Base.
03-08-2023 05:56 PM
Hi @Tran.Vinh,
I was asked to pass this along.
Can you please run this command with "curl -i" or verbose? It would be interesting to know if the server considers it a bad request or unauthorized.
Thanks,
Ryan, Cisco AppDynamics Community Manager
Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
Check out Observabiity in Action
new deep dive videos weekly in the Knowledge Base.
03-08-2023 06:31 PM
this is the result. I saw an internal server error with error code 500
03-09-2023 02:47 PM
Hi @Tran.Vinh ,
You're using docs that are four years old. The request header has changed since 4.5 (the latest docs are 23.x), so the request should be the following:
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" "https://<controller address>/controller/api/oauth/access_token" -d 'grant_type=client_credentials&client_id=<apiClientName>@<accountName>&client_secret=<clientSecret>'
See https://docs.appdynamics.com/appd/23.x/latest/en/extend-appdynamics/appdynamics-apis/api-clients.
The request header is now the following:
Content-Type: application/x-www-form-urlencoded"
I've been told that you should be able to use the Controller REST APIs with a trial license, BTW.
03-09-2023 06:44 PM
Hi @Joe.Catera
I tried sending a request flow your latest doc but I still have a new issue with 401 unauthorized
curl -i -X POST -H "Content-Type: application/x-www-form-urlencoded" -u "readyapi:683dfd51-60ea-4224-adc2-557e8d2212a0" "https://walker202302080517089.saas.appdynamics.com/controller/api/oauth/access_token" -d 'grant_type=client_credentials&client_id=readyapi@Waverley%20Software%20Inc&client_secret=683dfd51-60ea-4224-adc2-557e8d2212a0'
Could you help me check and correct if my syntax invalid
Thanks
03-10-2023 07:29 PM
Hi @Tran.Vinh ,
I'm not seeing anything wrong with your command syntax but am getting an "HTTP 401 Unauthorized" error. I'm asking one of our engineers to take a look to see if your command syntax is correct or if it's a credential issue. I'll get back to you next week with his response.
03-16-2023 06:16 AM
@Joe.Catera
Do you have any update?
03-16-2023 11:54 AM
@Tran.Vinh , I asked an engineer to help in a support ticket, but I haven't heard back, so I wrote to the engineer directly. Sorry about the delay.
03-16-2023 06:20 PM
@Tran.Vinh , the engineer wants to confirm that you are using the correct parameters for the `client_id` parameter. Can you verify that `Waverley%20Software%20Inc` is your account name and that `readyapi` is your API client name? Since you are not getting an HTTP 500 error, in other words, it doesn't appear to be a syntax issue, that the authorization 401 error might be caused by incorrect credentials---at least that's what we're trying to determine.
User | Count |
---|---|
4 | |
4 | |
3 | |
1 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form