I am trying to wrap my head around how to use the retool OAuth resource by hooking into the Reddit API. I'm not sure if the Reddit API is doing something unusual, or if I'm just not understanding how this works.
Reddit API: OAuth2 · reddit-archive/reddit Wiki · GitHub
I've created an app, marked it as a script, and have copied the redirect uri from the retool OAuth2 setup. When I try and test this in retool, I'm directed to the Reddit page that asks me to grant it access, but then I get a 403 when i'm redirected back to Retool. It shows me a giant block of html. I have two headers setup, the "user-agent" and the "authorization" headers.
I feel like I've setup everything correctly and tried to debug this. Can anybody help me understand what I'm doing wrong? I'd really appreciate any help.