Why is request async returing http 422?

I am attempting to save in game analytics to an airtable but for some reason the response I get is Http error 422 even though I checked the same request with postman and it successfully worked there.

any idea why I get the http error 422? I tested this out with postman and it was able to succesfully change the airtable. ```
local HttpService = game:GetService("HttpService")

local url = "https://api.airtable.com/v0/appQzNQ9VTzFbo8wh/Table%201"
local data = HttpService:JSONEncode(
    {
        ["records"] = {
            ["fields"] = {
                ["Name"] = "CoolName2"
            }
        }
    }
)

local response = HttpService:RequestAsync(
    {
    Url = url,
    Method = "POST",
    Headers = {
        ["Content-Type"] = "application/json",
        ["Authorization"] = "Bearer KEY_HERE"
    },
    Body = data
    }
)

if response.Success then
    print("Status code:", response.StatusCode, response.StatusMessage)
    print("Response body:\n", response.Body)
else
    print("The request failed:", response.StatusCode, response.StatusMessage)
end

Looks like the syntax was correct, but somehow it wasn’t able to process it, maybe the values are wrong or something. Check it up.

thanks, I already read that and I doubled checked the values. I copied the exact authorization and other headers but still no luck.

Apparently there’s a forum for airtable as well, perhaps this has the similar issue?

If there’s still no luck, I’d suggest browsing that forum instead, since it is starting to reach that point instead. According to an article I read earlier, they mentioned that 422 errors are variably specific and cannot be resolved by one general solution.

I will try but I think this belongs more on dev forum since the issue occurs in studio and not outside of it.

You can still ask here, but the issue seems more technically directed at the HTTP rather than the scripting technicality. Your best guess is still at their forum if you’re going to use Airtable. Perhaps they have one applicable solution for the 422 error?