mod_curl help

Status
Not open for further replies.

rkbsimpsipper

Member
Jan 3, 2022
34
2
8
40
I am having issues getting my cURL request format correct when using mod_curl.

My working raw data when ran in terminal and postman is

curl --location 'https://omitted/b7a89aef-3702-42ab-b967-9645464efbe1/unlock' \
--header 'Authorization:Bearer 5xhG04G2nCWVEtpUeqzN3OQJCOc0VNRp' \
--header 'accept: application/json' \
--header 'content-type: application/json'

I simplified it to run as a one line command if it makes it easier
curl https://omitted/b7a89aef-3702-42ab-b967-9645464efbe1/unlock -H 'Authorization: Bearer 5xhG04G2nCWVEtpUeqzN3OQJCOc0VNRp' -H 'accept: application/json'

According to mod_curl or just typing curl in fs_cli, I need this formatted like so
curl url [headers|json|content-type <mime-type>|connect-timeout <seconds>|timeout <seconds>|append_headers <header_name:header_value>[|append_headers <header_name:header_value>]|insecure|secure|[proxy <http://proxy:port>]] [get|head|post|delete|put [data]]
I have tried a couple different ways directly from fscli
curl https://omiited/b7a89aef-3702-42ab-b967-9645464efbe1/unlock [headers|json|content-type application/json|append_headers authorization:bearer 5xhG04G2nCWVEtpUeqzN3OQJCOc0VNRp][get]
But always receive a
{"msg":"The access token is missing","code":"E_U_ACCESS_TOKEN_INVALID"}

Can anyone give me some tips with passing bearer tokens with mod curl? I am struggling a bit.

I can run curl without auth all day, but that is asking for trouble lol

Any help is appreciated

Thanks

KB
 
Status
Not open for further replies.