Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

Cannot Restrict my Google API key to my Repl.it

Leo32345
Leo32345

I recently made a project using the Google Developers API and hosted it on Repl.it. However, when I try to restrict my Google API key to my Repl.it url, it blocks access completely.

I have a feeling this issue has to do with Repl.it; does anyone know how to fix this?

1 year ago

Voters

Comments

TopNew
1
1
EpicGamer007
EpicGamer007

Try to go the the shell of the repl and type printenv REPL_ID then go to <INSERT REPL ID RETURNED BY THE PREVIOUS command>.id.repl.co. Confirm that works then put that on the whitelist for the url

1 year ago
0
Leo32345
Leo32345

@EpicGamer007
I tried that, but it does not work for some reason

1 year ago
1
Leo32345
Leo32345

Is there some way to see all the domains that requested API data on the Google Developers console so maybe I can make sure I am using the right domain?

1 year ago
1
Coder100
Coder100

Try opening it into a new window, the embedded output is different than the one you see in replname.username.repl.co

1 year ago
1
Leo32345
Leo32345

@Coder100
Yes, I actually always go to the actual webpage to see the results, but doing so doesn't fix the issue.

1 year ago
1
ch1ck3n
ch1ck3n

what url did you set it on google and what is the URL of the repl?

1 year ago
1
Leo32345
Leo32345

@ch1ck3n
I added the following URLs:

myprojectname.leo32345.repl.co

Then I tried the following but to no avail:

*.leo32345.repl.co *.repl.co *.replit.com
1 year ago
1
CakraDarma
CakraDarma

@Leo32345
do you have solution for now?

7 months ago
Load more