This topic is locked

Rest API Authentication (curl -H authentication option)

2/23/2026 21:45:53
PHPRunner General questions
J
John author

I am attempting to call an API that requires a bearer token for access. I can obtain that token without issue but I can not seem to emulate the follow curl statement properly within v10.91.

curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzc0MTQ2Mzg5LCJpYXQiOjE3NzE1NTQzODksImp0aSI6IjNmMjAzMDZlNmNiZjQzMmFiMGRhNmI2MThiY2QyNDEwIiwidXNlcl9pZCI6IjJiNGQ4ODM5LTE1ZjMtNGI4NC04YjU1LTFkMTk1OWQ1M2YwYyIsImVtYWlsIjoiYXBpLTIyNWZyYW5rbGluQGl0b3VjaGluYy5jb20iLCJpc3MiOiJodHRwczovL2FwaS5jb25uZWN0LmJ1aWxkaW5nZW5naW5lcy5jb20ifQ.bdLMY_NEnTG75kxWep6DG17dy8o1jCzeLdF699Ar-YA" "https://api.*****.*/*****itors?limit=500&offset=0&visitdategte=2026-02-19"

The problem is to be that I do not know where the -H option should be inserted.

Any ideas

Thanks

John

PHPv1091_Rest_image.jpg
Sergey Kornilov admin 2/24/2026

-H means header, this is not something you can pass via URL. Since this is authentication related you need to choose one of authentication options, most likely API key. You need to check their documentation to see wat they say in regards to autnetication and implement it.

S
Stu1983 2/25/2026

I'm having a similar issue, though I'm on ASPRunner.net and version 11.2, I choose the API key/HTTP Header option and the request fails, however if I add the key to the HTTP Headers option in the request it works.

can we get an option to sepcify additonal headers for the connection that would mean we can add the authorization and the content type for the 'connection' rather than having to specifiy it for every single request

Also it would be good if the 'Response' window cleared as soon as you click 'Run request' when your request fails the error messsage remains, so when you click run request agian you don't know if its the same error or not, in my example the request takes 5 to 10 seconds to return data and while it waits I was still seeing the previosu 500 error.

Request.png
Connection.png
Sergey Kornilov admin 2/25/2026

@Stu1983,

feel free to contact us directly with more details and we'll help you configure it.

You can always choose 'Custom' if you need more complex configuration but I don't think it is necessary in this case.