Hi, So I looked at various tutorials (@Taifun Dropbox example) and somewhat understood how to use cURL (Still not that clear). Please have a look at the screenshot below:
Use request headers block to pass on API key & auth token.
Now how can I post the rest of the data like amount, purpose etc? What block should I use? And in which format?
And also, is my logic so far is correct? I am a total beginner to API and stuff…
How can I pass on url, api key and auth token (headers) using terminal extension? What is ‘-F’ in the curl? Instamojo website hasn’t given any example like that? I really can’t understand… I’ve been trying for the past two days… So I don’t have to use web component? I have to use the terminal extension? Can you please,please just tell how to create the request (please look at the screenshot)? Please it would be really helpful if you let me know how to do this properly…
Looking at the part of the CURL example above, can you identify the parameters amount, buyer_name, email, phone and their values (compared to the bottom - return)? Try to remove some non-mandatory parameters and send the CURL
I used request headers block for sending Api key and auth key
I did these after following @Taifun 's dropbox tutorial. Now how can I send the rest of the parameters (amount, buyer_name)? Should I use build request data or post text blocks of the Web component? Can you walk me through it?
I did look at the aia file. It uses a different format than what is given in the docs of Instamojo. For example, what is -F used in that curl command in the aia?
How can I convert :
*curl https://www.instamojo.com/api/1.1/payment-requests/ *
you said, you used the web component and you already set up the request header… fine…
now just put the data into the PostText block and find out, what will be returned in the GotText event
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.
“-d, --data
(HTTP MQTT) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button”.
YES! Did it!!! I know how some basics of working with API. I didn’t really know how to use web component, so I spent so much time figuring how to work with it. Now let me see how I can apply this knowledge to work with other APIs. Thanks a lot! Your Dropbox tutorial also helped a lot!!!
I didn’t have to use terminal since I got it working with web component. Now I have two methods to work with API! Thanks a lot for your help, I got to learn about API, cURL etc just from this…
I will post it, my code isn’t exactly readable though. I will post the proper tutorial if I can to help others. Many of the tutorials on the internet is not free.