Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

curl command used in terminal returning bad/illegal format or missing URL?

Rchowdhury1 April 6, 2021

I am creating a script in python that can gather data from an atlassian confluence wiki page through an http request using the curl command. The confluence website I am trying to access is maintained by my company's server. The command I am currently using is:

curl -v -w -u admin:admin "https://confluence.wdc.com/rest/api/content/494966598" | python -mjson.tool

In place of admin:admin I type my username which is my email then a colon and my password so for eg. ridwan.joshi@wdc.com:thisispassword@ai I know that the link is correct as when I click "https://confluence.wdc.com/rest/api/content/494966598" it directly takes me to the page which gets displayed in a JSON format with all the information but when I try to enter that command in the terminal I get an error as the screenshot depicts:

confluence server error.png

I am thinking it might be due to the special characters like @ used in both email and password and so I used \@ to escape the character but it still shows the same error. Also I put quotes around the entire user credentials for e.g "ridwan.joshi@wdc.com:thisispassword@ai" but still no success.

How should I securely authenticate to my company's confluence page through the terminal and eventually through my Python script?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events