Skip to main content
Best answer

URL Encoded GET Request from Zapier Platform

  • November 18, 2022
  • 1 reply
  • 725 views

Metagrate_John4man
Forum|alt.badge.img+1

(Apologies if this is a repost, we attempted to post it earlier but don’t see it.)

 

This CURL request works successfully in Postman but it isn’t clear how to make this HTTP request from Zapier platform. Can you please provide a sample? Thanks!

 

curl --location --request GET 'https://api.stripe.com/v1/customers/search' \
--header 'Authorization: Bearer sk_live_xxxxxxxxxxxx \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Stripe-Version: 2022-11-15' \
--data-urlencode 'query=email:"someone@example.com"'

 

Best answer by ianscoBest answer by iansco

Hi @Metagrate_John4man! 👋

My understanding of CURL is that when using the --data-urlencode parameter to send data using a GET request, the data is sent via the request querystring rather than in the request body.

You can create an action using the Zapier Platform UI to send a GET request that does the same thing by adding any request parameters and values into the “URL Params” section:

17bc547133906e47bbf8e9b092ee17fb.png
Link to full-size image

Request headers and values can be entered into the “HTTP Headers” section in the same way:

32b927afa8022d83113e520d341f9caf.png
Link to full-size image

Note: header values related to authentication such as API Keys would be available after you’ve setup Authentication in the app.

If you need more control over the request (or response), you can click the “Switch to Code Mode” button and write code to do that.

In case it’s useful, our “CLI” documentation has a section on “Making HTTP Requests” that shows some example code and the platform schema documentation details all the properties can be set on a request.

Please could you give this a try and let us know how things go?

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

iansco
Forum|alt.badge.img+1
  • Zapier Staff
  • 18 replies
  • Answer
  • November 22, 2022

Hi @Metagrate_John4man! 👋

My understanding of CURL is that when using the --data-urlencode parameter to send data using a GET request, the data is sent via the request querystring rather than in the request body.

You can create an action using the Zapier Platform UI to send a GET request that does the same thing by adding any request parameters and values into the “URL Params” section:

17bc547133906e47bbf8e9b092ee17fb.png
Link to full-size image

Request headers and values can be entered into the “HTTP Headers” section in the same way:

32b927afa8022d83113e520d341f9caf.png
Link to full-size image

Note: header values related to authentication such as API Keys would be available after you’ve setup Authentication in the app.

If you need more control over the request (or response), you can click the “Switch to Code Mode” button and write code to do that.

In case it’s useful, our “CLI” documentation has a section on “Making HTTP Requests” that shows some example code and the platform schema documentation details all the properties can be set on a request.

Please could you give this a try and let us know how things go?