Twitter API, Error 401 Unauthorized

Hello ^^

Im doing a Twitter Verification lately, my only problem is that twitter is returning with the Message:
"title": "Unauthorized", "type": "about:blank", "status": 401, "detail": "Unauthorized"

For my bearertoken im using this function, because it contains % [Unallowed Character]

This is the following code for the Data Request to get the id:

local UserIdAsync = HttpService:RequestAsync({Url = "https://api.twitter.com/2/users/by/username/" .. Username, Method = "GET", Headers = { ["bearer-token"] = BearerToken, ["api-key"] = ApiKey, ["api-key-secret"] = ApiKeySecret} })

What am i doing wrong? I looked into so many devforums, and i am kinda new to HttpService, since i never really use it.

  • Thanks to them who help, and have a nive day ^^