Question

Cannot Login with CommVault API

  • 13 September 2023
  • 3 replies
  • 142 views

Badge +2

Hello,

I’m a DE integrating Commvault API to be ingested in our DWH for a customer.

url = "http://<commserver url>/webconsole/api"

payload = json.dumps({
"password": "<password>",
"username": "<username>"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)


When I execute this code in order to receive the token, I’m getting

}#34;errorMessage":"Access denied","errorCode":5

How can it be fixed ?


3 replies

Userlevel 3
Badge +10

@John_DE 

Use the below link: make sure the password is base64 encoded

https://api.commvault.com/#2bb1e4dc-7a04-4343-ab35-4a2b2adf541a

Badge +2

Hi Navneet,
I’ve encoded the password in base64 and still I get 

Error after sending Login Route
 

 

Userlevel 3
Badge +10

@John_DE 

Please check if the Webconsole URL is correct. Also try running the API with POSTMAN tool if possible.

Raise a support case if doesn't work.

Reply