Authentication error when trying to request image upload link

Hi, I’m new to Cloudflare and am getting Authentication errors when I make a POST request to upload an image. Here is my request code:

requestImageUploadLink clientId =
        { url = "" ++ Env.cloudFlareAccountId ++ "/images/v2/direct_upload"
        , headers =
            [ Effect.Http.header "Authorization" ("Bearer " ++ Env.cloudFlareAPIKey) ]
        , method = "POST"
        , timeout = Nothing
        , tracker = Nothing
        , body = Effect.Http.emptyBody
        , expect = Effect.Http.expectJson Types.GotCloudFlareUrlDataPlus (oneTimeUrlDecoder clientId)

I’ve double-checked both the API key and the Account ID. The response from the request is

{"success":false,"errors":[{"code":10000,"message":"Authentication error"}]}


I’ve tried the request that you mention in It gives the same result:

curl --request POST \
  --url \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer TOKEN'

{"success":false,"errors":[{"code":10000,"message":"Authentication error"}]}

Same exact problem. I’ve created a new API token, Account.Cloudflare Images and Edit, doesn’t work (errors: [ { code: 10000, message: 'Authentication error' } ]). What else should we add to permissions?