curl: (3) URL using bad/illegal format or missing URL
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0* Could not resolve host: about
Closing connection 0
curl: (6) Could not resolve host: about
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0* Could not resolve host: the
Closing connection 1
curl: (6) Could not resolve host: the
Closing connection -1
curl: (3) URL using bad/illegal format or missing URL
curl: (3) unmatched close brace/bracket in URL position 65:
Needed…, email: majort@ground.control, priority: 1, status: 2 }
^
The error logs says curl: (3) URL using bad/illegal format or missing URL curl: (3) unmatched close brace/bracket in URL position 65: Can you try changing the double quotes to single quotes as below
curl -v -u SuperSecretAPIKey123:X -H "Content-Type: application/json" -d '{ "description": "Details about the issue...", "subject": "Support Needed", "email": "majort@ground.control", "priority": 1, "status": 2 }' -X POST 'https://myhelpdesk.freshdesk.com/api/v2/tickets'
Hello,
I tried ensuring all quotes were “double quotes” and ‘Single Quotes’, and I pretty much get the same error:
curl: (6) Could not resolve host: Curl
curl: (3) unmatched close brace/bracket in URL position 59:
API, email: majort@ground.control, priority: 1, status: 2 }
Please make sure you copied the above shared curl script without missing anything. Feel free to copy & try once again as the log is pretty clear close brace/bracket unmatched.
Still facing issues, please share the updated curl command that you’ve tried?
Also, try installing something like git bash if you haven’t already & check with that terminal if it’s working for you.
Hello Everyone,
I figured it out. First, I had to add ‘type’ as it was a required field. The main thing I had to do was adjust the command like this:
escaping all of the double quotes with backslash
\“STRING\”: \“VALUE\”
curl.exe -v -u SuperSecretAPIKey123:X -H “Content-Type: application/json” -d “{ \“description\”: \“Details about the issue…\”, \“subject\”: \“Support Needed\”,\“email\”: \“majort@ground.control\”, \“priority\”: 1,\“status\”: 2, \“type\”: \“Request\” }” -X POST ‘https://myhelpdesk.freshdesk.com/api/v2/tickets’
I hope this post helps someone else. I wasn’t able to make Invoke-WebRequest work yet. Not sure why there either lol.