Thanks @Baptiste ! I watched the video and I had learned most of that from the help docs page too, but still there was not specific code that would work in the body like I wanted.
The only other API that I had gotten working is a POST request and the service gave me the code directly which I tried in the custom body, basically this:
{
"document_uid": "{{DocID}}",
"api_key": "MY_KEY",
"format": "json",
"image_type": "jpeg",
"modifications": [
{
"name": "ColorOverlay",
"background-color": "{{CustomHex}}"
}
]
}
Which seems the same as your example. Is that JSON?
So immaga doesn't have anything in their examples in their documentation here:
https://docs.imagga.com/I tried to create my own in the format above but the authentication wouldn't work. I figured out from the immaga docs and chatGPT that I had to get my authorization into the headers as a key:
Authorization
And the value
Basic My_API_Key:MyAPI_Secret(in Base64 format)
Immaga supplies the above on the user dashboard.
Then for the url input, I tried putting it into the body as a JSON like this:
{
"image
url": "{{ImageUpload}}"}But that doesn't work it gives an error it doesn't have parameters. All of the examples in the docs are:cURL Python PHP Ruby Node.js Objective C Go _ C#
I've also seen at "APILayer" which has other APIs I want to use have additionally
Javascript and Swift
I guess what I am wondering is how to know how to enter the parameters and the options/proper ways to do so because I want to be able to use any API sucessfully.
For this one I figured out (with the help of ChatGPT and me giving it the docs URLs and asking it for specific steps) that I needed to use the query parameters to get the immaga API to work for me.
I have also figured out I can just append the values to the URL for that one so take a look at the images to this comment- those both worked.