(Header "app_id" has unallowed character "_") but required to be used

Hello, I’m currently trying to make a GET request, which requests a word from the Oxford Dictionary API, but to request something from it, you need an app_id and an app_key in the header of the request, but the console just throws an error which says that the underscores are not allowed.


Now I do not know what to do because of that error. Would there be any way to fix it?
Code:

local HttpService = game:GetService("HttpService")
local language = "en-us"
local word_id = "hello"
HttpService:RequestAsync({
	Url = "https://od-api.oxforddictionaries.com:443/api/v2/entries/"..language.."/"..word_id:lower(), 
	Method = "GET", 
	Headers = {
		["Content-Type"] = "application/json", ["app_id"] = "id", ["app_key"] = "key" -- i removed key and id
	}
})

You should send a message to @Bug-Support with details, because they should be allowed.

Apparently roblox needs to change a config on their side.

In the meantime, it is a bug, and you’ll need a workaround. Possible ones:

  • Maybe the oxford API has some undocumented things you can try:

    • Try using app-id and app-key, maybe the oxford API will accept hyphens
    • Maybe they’ll accept a standard Authentication header instead of separate id/keys. This is just a base64-encoded "id:key" string. I wrote code for doing this in roblox here. Try that instead of these two headers?
  • Host your own server that uses better-named headers and forwards them to oxford’s API. More complex but there are lots of online hosting options that would let you do this relatively cheaply.

1 Like

The hyphens did work, thank you!

1 Like