# Invalid API key error when sign in / sign up

**URL:** <https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260>\
**Category:** Questions about Thunkable X\
**Tags:** firebase, login, help, auth\
**Created:** [October 7, 2021, 2:37am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260 "2021-10-07T02:37:24Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)\
**Post date:** [October 7, 2021, 2:37am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/1 "2021-10-07T02:37:24Z")

</div>

@tatiang @muneer @domhnallohanlon @darren

Hi,

I am currently facing an issue with sign in / sign up for my app. When trying to login or create a new account, I get the error ‘Your API key is invalid, please check you have copied it correctly.’ However, I have made 100% sure that I copied the API key correctly from Firebase.

I have searched this forum and have seen that people have run into similar issues but I have not seen a clear reason as to why this is occurring and how I can fix it. Below is a link to the project. Any help would be much appreciated.

[https://x.thunkable.com/copy/74aaec716e7ef96c090faa5bc9fe3a7d](https://x.thunkable.com/copy/74aaec716e7ef96c090faa5bc9fe3a7d)

Thanks!

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [October 7, 2021, 2:49am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/2 "2021-10-07T02:49:55Z")

</div>

> [@jakeheron](#):
>
> I get the error ‘Your API key is invalid, please check you have copied it correctly.’

did you check the firebase/GCP console ? if the projects there, click it check if the web app’s there. if not, create it and connect it with the newly provided API key.

> [@jakeheron](#):
>
> clear reason as to why this is occurring and how I can fix it

privatly message [@Thunkable\_Staff](https://community.thunkable.com/groups/thunkable_staff) as they could help you.

---

<div class="post-metadata">

**Author:** ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)\
**Post date:** [October 7, 2021, 3:01am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/3 "2021-10-07T03:01:53Z")

</div>

Yes, a web app has been created, I have tried making a new Firebase project entirely and copying the new API but it still did not work.

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [October 7, 2021, 3:05am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/4 "2021-10-07T03:05:43Z")

</div>

did you enter a database URL?

please help [@Thunkable\_Staff](https://community.thunkable.com/groups/thunkable_staff)

try entering it again and again. this may work.

---

<div class="post-metadata">

**Author:** ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)\
**Post date:** [October 7, 2021, 3:12am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/5 "2021-10-07T03:12:21Z")

</div>

Yes I have copied the database URL.

---

<div class="post-metadata">

**Author:** ![namitnagar](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@namitnagar](https://community.thunkable.com/u/namitnagar)\
**Post date:** [October 7, 2021, 3:18am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/6 "2021-10-07T03:18:19Z")

</div>

Did you on authentication

---

<div class="post-metadata">

**Author:** ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)\
**Post date:** [October 7, 2021, 3:19am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/7 "2021-10-07T03:19:33Z")

</div>

Yes, I have followed all the steps to set up the sign in / sign up component.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 7, 2021, 7:43am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/8 "2021-10-07T07:43:46Z")

</div>

I tested your app using my API key and Database URL and it is working.

One thing that worth noticing. Would you say that this situation applies to you?

> [@Firebase Realtime database not working when you choose Europe datacenter](https://community.thunkable.com/t/firebase-realtime-database-not-working-when-you-choose-europe-datacenter/1280376):
>
> Hello Guys, My small contribution to this wonderfull communitiy. I was creating my project and trying to connect with Firebase Realtime database without success. The bug is simple : Do not chose server location in Europe when you create your DB Cheers

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [October 7, 2021, 8:08am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/9 "2021-10-07T08:08:54Z")

</div>

> [@muneer](#):
>
> > [@](#):
> >
> > Hello Guys, My small contribution to this wonderfull communitiy. I was creating my project and trying to connect with Firebase Realtime database without success. The bug is simple : Do not chose server location in Europe when you create your DB Cheers

he said

> [@jakeheron](#):
>
> I am currently facing an issue with sign in / sign up for my app.

so your post desn’t make sense.

> [@jakeheron](#):
>
> Yes I have copied the database URL.

ok, simple steps approved we should have [@Thunkable\_Staff](https://community.thunkable.com/groups/thunkable_staff) here.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 7, 2021, 8:20am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/10 "2021-10-07T08:20:33Z")

</div>

> [@vishruth-ram](#):
>
> so your post desn’t make sense.

**What doesn’t make sense to you could make all the sense to others.**  
Have a nice day.

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [October 7, 2021, 8:28am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/11 "2021-10-07T08:28:31Z")

</div>

> [@muneer](#):
>
> What doesn’t make sense to you could make all the sense to others.

> [@vishruth-ram](#):
>
> > [@muneer](#):
> >
> > > [@](#):
> > >
> > > > Hello Guys, My small contribution to this wonderfull communitiy. I was creating my project and trying to connect with Firebase Realtime database without success. The bug is simple : Do not chose server location in Europe when you create your DB Cheers  
> > > > [/quote]
> > 
> > he said
> > 
> > > [@jakeheron](#):
> > >
> > > I am currently facing an issue with sign in / sign up for my app.

---

<div class="post-metadata">

**Author:** ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)\
**Post date:** [October 7, 2021, 8:48am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/12 "2021-10-07T08:48:02Z")

</div>

@muneer  
I have checked the server location, however, it is ‘United States (us-central1)’, so I do not think that is the problem. Would you possibly mind sharing your Firebase configurations / settings (with any details blurred out of course) so I can see if there is any discrepancies with mine?

---

<div class="post-metadata">

**Author:** ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)\
**Post date:** [October 7, 2021, 8:55am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/13 "2021-10-07T08:55:53Z")

</div>

@Barreeeiroo @lucatunes @domhnallohanlon @tatiang [@Thunkable\_Staff](https://community.thunkable.com/groups/thunkable_staff)

Any help with this issue would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 7, 2021, 9:02am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/14 "2021-10-07T09:02:37Z")

</div>

Project setting

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/4/84eae0ad2d71457028c7afb79e535857a9cab0fb.png)

Sign in method

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/084a8f514afb52c5d015f294a6a377cbff64bfec.png)

Web App

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/2/d2f3547c0cacc42d64e910047a90fbc46975c8ea.png)

Sample of accounts created by the `Sign In` component

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/1/e11e37310c4977b5ab62fcf47ea629d4cac7e7bd.png)

---

<div class="post-metadata">

**Author:** ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)\
**Post date:** [October 7, 2021, 9:12am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/15 "2021-10-07T09:12:29Z")

</div>

I think I may have discovered what the issue is. When I live test the project on my machine, the error does not appear. however, when I have shared the project link with other people and they try to run it, the error message comes up. I have just noticed the only one firebase account is allowed per project, therefore when they make a copy of the project and run it, it is not allowing the app to connect to Firebase since the Web API is already in use.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 7, 2021, 9:15am UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/16 "2021-10-07T09:15:42Z")

</div>

What do you mean by copying the project?  
If you mean within Thunkable then the problem is when you share a project Thunkable will automatically remove the keys. This is a security issue.

Those copying your project should use own keys unless you share the keys with them.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 7, 2021, 3:05pm UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/17 "2021-10-07T15:05:40Z")

</div>

Right. The other option is to publish the app with your Firebase settings and then everyone who uses the app automatically uses your settings.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:14pm UTC](https://community.thunkable.com/t/invalid-api-key-error-when-sign-in-sign-up/1548260/18 "2024-11-08T13:14:54Z")

</div>


