Hello,
I’ve been searching for a solution to this for some time now to how to pass an API key. The closest forum post I’ve found is:
Hi,
1) You'll need to create a header for the HTTP basic authentication, which takes the values from the -u parameter.
2) For URL-encoding the data, there's currently no ready-to-use node. (would be nice to have)
So you'll have to resort to some Java scripting for both. For (1) I have a ready-to-use example. Get in touch via email if you're interested.
Kind regards,
Philipp
The original post describes the same type of get request I’m trying to make. Here is my example:
curl https://{site}/api/v2/items \
-G \
-u {site_api_key}:\
-d type[is]="widget" \
--data-urlencode limit=2\
I think option 1) from Philipp is what I’m looking for. Unfortunately, the solution isn’t posted. Is there a way to do this in GET Request or HTTP Retriever?
Or @qqilihq , can you share the ready-to-use example you referred to?
All the best.
Hi seth_ekc,
this is an “HTTP Basic” authentication. You can do it with the HTTP Retriever as follows:
Hope that helps.
1 Like
Thank you. It’s been a crazy busy week, so I haven’t had a chance to try this yet, but will follow up when I do.
1 Like
qqilihq
December 14, 2022, 4:56pm
4
@seth_ekc No worries. In case of any questions get back anytime!
system
Closed
March 14, 2023, 4:56pm
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.