Hello guys. So im trying to make an API call. Im using excel to take the data that I need and loop it, but I have a problem. There is a header that is neccessary to the succesion of the call called photos. When trying online, it only worked like this:
But im lost. I tried to folow the method you sent me, but i was unsucsesful. I just have little to no knowlage of the VBA codes reading. Could you please be so kind and help me? The main headers are accept and Content-Type. The main parameters are username, password, user_token and photos 4 times. The photos value is comming from an excel file. Could you please help me. Thanks a lot!
After the unsuccseful attempt with the suggestion i Though, is it possible to do the api call using the “Body” in my case? Lets say I could write a body, with the parameters values like CurrentRow.Item(“photos1”).ToString.
Would this overcome the photos key duplicate error?
Firstly, ill try to do the body thing, because i think it would be the easiest solution. I wrote down the whole body, but I still keep getting errors, because the configuration is wrong i think. Maybe you could help me with this? This is how the body looks like now:
To construct the URL-encoded query string, you can use the String.Format method or string concatenation to build the body as a string. Here’s an example:
In this example, I have removed the << >> and double & characters. The Uri.EscapeDataString method is used to properly URL-encode the values and handle any special characters within them.
Thanks a lot, I get 0 errors now. But one more question, what about the headers? Should they be in the raw body 2? And what about the http request activity section where there are “Headers” and “parameters”, should they be declared there also? Or should i leave theese parts blank?
Ideally after copying the text from there you need surround everything with double quotes and all the double quotes inside body needs to be replaced with double double quotes to escape…
Anyways good you got the body now
parameters are not needed unless you dont use variables in body…
and for headers …headers will be same as what you need
Holly molly, it worked. I just did the test run and it worked perfectly using the Body way. You guys are insane. Im really thankful to both of you. You both guys helped me insanely. THANKS A LOT!
Hello yet again. Because you helped me once, i hope you will help me for the last time with this topic. Can you please tell me, how can I put instead of CurrentRow.Item(“phhotos_4”) a variable called part_photos_gallery4? It has the same exact value as if CurrentRow.Item(“phhotos_4”) would have, but its not looped on a For each activity. The format of the value is a string put into another string variable. If you could, please help me with this problem, will be forever grateful