I have an authentication problem with a REST API Call with curl, I think its to do with the formatting of my curl input.
curl -v https://api.ananthsdomain.com/version1/testaccount/test \
-H "Accept: text/xml \
User-Agent: MyIn Interface \
X-Api-Signature: XXXXXXX+u:`date +%Y%m%d%H%M%S`:`echo XXXXXXX$(date +%Y%m%d%H%M%S)XXXXXXX | openssl dgst -binary -sha1 | openssl base64`"
I have to construct X-Api-Signature to match requirements from servers which includes API key, current date and sha1hash of the API key.
I'm receiving authentication error and I think it's because the signature is being set in the same line as User-Agent (output below)
Accept: text/xml
User-Agent: MyIn Interface X-Api-Signature: XXXXXXX+u:20160210112839:O9bXXXXXXXXXXXlVAXXXXXXXXXX=
The output I want to see is meant to be like this.
Accept: text/xml
User-Agent: MyIn Interface
X-Api-Signature: XXXXXXX+u:20160210112839:O9bXXXXXXXXXXXlVAXXXXXXXXXX=
How can I make curl produce the output so it appears like the above.