How would I use secrets? for Firebase

I’m really confused right now because I don’t know how to use it.

I tried entering my secret token for the Firebase URL as if it were the app URL, but it doesn’t work, and the result says Permission denied.

I’m guessing you are using the correct secret for local / live sessions as you aren’t getting an error regarding that. Also going to assume you are using a different URL than the one you provided, since that won’t direct to anything from a Get request on Roblox’s end.

If you are using local Secrets, is your Secret Base64 encoded? This may no longer be the case but one of the drawbacks to using local Secrets for testing within Studio play sessions was that they needed the actual data/APIkey to be in Base64 format instead of this being done automatically.

If you are using a local secret can you also provide the structure you have it in? You may have an error in the structure of it, or an incorrect domain whitelist.

{“TOKEN”: [“obviously my token”, “myapp.app”]}

Since I can’t share my actual token and API for safety reasons.

Try encoding ur token in base64 format if it isn’t already. I’d also suggest using wildcards in the domain wherever you can. I.e. for Google subdomains you’d do: "*.google.com" or to include things like google.co, "*.google.*"

Alright, I still don’t understand much, maybe because I’m not really into HttpService. Could you take a look at this and let me know what was I missing? maybe .app I should use a wildcards? also there isn’t any www.datatest it’s just like that https://datatest

{“TOKEN”: [“My token are here”, “datatest-1a-default-rtdb.asia-southeast1.firebasedatabase.app”]}

I mean, you don’t have my token, so I guess that’s fine?

It looks fine. Again just make sure your actual token is encoded in base64, you can do that here:
https://www.base64encode.org/

As for wildcards, this isnt just for things like “www” if you wanted to access any subdomains outside of “datatest-1a-default-rtdb.asia-southeast1” you would do "*.firebasedatabase.app"

1 Like

Oh yeah, I didn’t encode it. Maybe I wasn’t read it clear. Btw Thank you so much.

1 Like