Using a secret object in HTTP headers?

Hey everyone!

I’m trying to use the relatively new Secret object to authenticate my requests to my offsite database with the following code:

DataAPI.AUTH_KEY = HttpService:GetSecret("AUTH_KEY")

function DataAPI:GetData(targetUser)
    targetUser = tostring(targetUser)
    local headers = {
        ["Authorization"] = DataAPI.AUTH_KEY,
        ["TargetUser"] = targetUser
    }
    ...

I’m getting an error saying that my Authorization header contains unallowed characters. My assumption is that it is being parsed into the headers object incorrectly as the content of the key is entirely made up of letters and numbers.

It seems as if there is very little documentation to do with the secrets feature, but any help with this would be appreciated as I use plain text as a substitute in the mean time!