Skip to main content

Hello, I’m not an AA user but want to use AA Rest APIs.

My AA admin has generated an API key for me to use but I’m not able to authenticate using that API key.

AA Admin followed below steps

  1. Created a role with permission “Generate API Key”
  2. Assigned this role to the service account I want to use
  3. Generated API key by going to user setting page

 

Now I’m trying to generate the token to use REST APIs in postman but getting “Access Denied” error.

 

Any suggestion will be helpful.

if you want to check. Is token key valid?

just pass token in header not in Body.

your body parameters are for another method looks like.

documentation says: just use token

 


It says false but thats the token I got from control center and profile in AA portal says API key is active and doesn’t expire until 2052

 

 


@sudhik.sk You are using the wrong API call for authentication. It should be:

https://yourcontrolroom/v2/authentication

A “token” is what is returned from authentication. It is NOT your API key.

Also know the v1/authentication is deprecated and will always return a failure message.

Go to https://yourcontrolroom/swagger/  (be sure to include the trailing slash) for more information.


using v2, I’m getting below error

{
"code": "generic.server.exception",
"details": null,
"message": "An unexpected problem occurred"
}

 


Please show your request.

The body sent over, since you’re using an API key, should look like this (key is case-sensitive):

{“apiKey”:”asdfasdfasdfasdf”}


Yes, I’m sending the key as it should be sent.

 

 


Hey, I even got my user account to have admin access and tried to generate a token using my username and password but that throws the same error too. In v1, it says access denied and in v2, it gives internal server error.

 

Do I need to enable something else in A360 to use the control room APIs?


Why are you sending the username AND the API key? That's not what I posted. 

Make sure you have API access for the user account you're using to access the API. 


I tried only sending api key. In v1, I get same “Access denied” error. In v2, I get below error

 

```

{

    "code": "UM1110",

    "details": "This may be due to a misspelling or because your Caps Lock is on. To continue, please retype your username and password.",

    "message": "Either your username or your password is incorrect"

}

```


V1/authentication is deprecated. Do not use it. ⛔️

Sounds like the user account you generated the API key for does not have the correct privileges. Check that the user that you generated the API key for has API privileges. 


What privileges are required? I tried with two user accounts one with system admin privileges too and that didnt work either 


They need a role that contains Generate API-Key options. It's recommended you create a separate user for API access. 


That’s what we did. We created a new role with that permission and assigned that role along with some other roles to a new user for whom I created the api key


I would recommend reaching out to your CSM at this point in case there is some customization in your environment. 

I have no problem accessing our APIs using PHP on a separate web server. 


Yes, waiting for the support to respond. Thanks for all the help, I’ll let this thread know of the solution once I know


It was probably an issue with our firewall but URL “{{baseUrl}}/v2/authentication” works fine


Reply