# OpenAI ChatGPT API KEY not working

**URL:** <https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167>\
**Category:** Questions about Thunkable X\
**Tags:** webapi\
**Created:** [March 13, 2023, 6:21am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167 "2023-03-13T06:21:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![cseducator\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@cseducator\_mindchamp](https://community.thunkable.com/u/cseducator_mindchamp)\
**Post date:** [March 13, 2023, 6:21am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/1 "2023-03-13T06:21:23Z")

</div>

Hi , after chatGPT was integrated in Thunkable I followed the Thunkable documentation and it was working in My Thunkable app. But when my student tried it the same way , it was not working for her, the app gives “undefined” as the response , Anyone facing the same problem or can help why it may be occuring? The codes and process of applying API key is same.

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 13, 2023, 7:26am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/2 "2023-03-13T07:26:42Z")

</div>

it’s still working - show us what blocks you’ve put together (cross out the api-key)

---

<div class="post-metadata">

**Author:** ![cc9265142h5iy3](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@cc9265142h5iy3](https://community.thunkable.com/u/cc9265142h5iy3)\
**Post date:** [March 13, 2023, 7:55am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/3 "2023-03-13T07:55:54Z")

</div>

Thanks @manyone for your time and reply. Here are the design and blocks images of my app

 ![16786940157917440627495588911892](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/8/e8bbab630b0e407abd369dff6c8180b84c438a83.jpeg)  
 ![16786940586661739751213233933293](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/5/e58203296038fb3bc8098c4b20e282e77fa3f348.jpeg)  
Sorry for a bit darker images, hope you can see the details here. TIA

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 13, 2023, 11:08pm UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/4 "2023-03-13T23:08:46Z")

</div>

did you open it as a d&d project?  
read this:

> [@OpenAI ChatGPT Now Available in Thunkable with Our New Integration](https://community.thunkable.com/t/openai-chatgpt-now-available-in-thunkable-with-our-new-integration/2209360):
>
> Hey Thunkers! We’ve just introduced a new integration with OpenAI’s ChatGPT model. It’s very easy to use and add into your own apps! Take a look at our latest blog post below and let us know what you think! We’d love it if you could share some of the apps you create using ChatGPT. I’ve created a demo app [here](https://x.thunkable.com/projectPage/63b47ece8af02c021ac5e2c4) that you are welcome to remix and play around with. We also have a new set of [docs](https://docs.thunkable.com/openai-chatgpt-integration) on how to use Chat GPT.

you do need to enter your api-key in the settings section of the openai services (beta) panel.

---

<div class="post-metadata">

**Author:** ![cseducator\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@cseducator\_mindchamp](https://community.thunkable.com/u/cseducator_mindchamp)\
**Post date:** [March 14, 2023, 6:18am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/5 "2023-03-14T06:18:54Z")

</div>

Thank you @manyone . Yes for sure I am using D&D as Open AI is not available on classic mode. I have put the API key in the set API key block as shown in the code blocks, sending the clear screenshots again. Can you please elaborate where exactly to put the API key in Thunkable code

 ![chatbot1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/3/23ff4c50f0268a4b6b58b017079d525d2790d875.jpeg)  
 ![chatbot2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/a/3a6fc5ac793bc69a4e740f330e8c808bac9076a0.jpeg)

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 14, 2023, 7:44am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/6 "2023-03-14T07:44:22Z")

</div>

then there’s only one reason i know why it’s not working - before you got an apikey, you must have registered your name and added a credit card. they gave a max $18 credit during the trial period - you may have used it all up. and your apikey has been disabled. youlll have to login to openai and put it some more money in to your account

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 14, 2023, 7:47am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/7 "2023-03-14T07:47:00Z")

</div>

> [@manyone](#):
>
> you do need to enter your api-key in the settings section of the openai services (beta) panel.

did you read the link i provided? it describes how to enter the apicode (not through the set block) by a special settings adjusment. please read the link.

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

---

<div class="post-metadata">

**Author:** ![cseducator\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@cseducator\_mindchamp](https://community.thunkable.com/u/cseducator_mindchamp)\
**Post date:** [March 14, 2023, 9:07am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/8 "2023-03-14T09:07:32Z")

</div>

Thanks @manyone .Yes I have put it now, earlier I missed doing that, but still its not working.

Also, I have created this account in OPENAI just a day ago and using the API key hardly 2-3 times to test its working and I have not put any credit card information. Is it needed?

---

<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:** [March 14, 2023, 3:23pm UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/9 "2023-03-14T15:23:42Z")

</div>

@cseducator_mindchamp  
Could you please share more information about your issue?  
How did you test it?  
What text did you add as a prompt?

---

<div class="post-metadata">

**Author:** ![cseducator\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@cseducator\_mindchamp](https://community.thunkable.com/u/cseducator_mindchamp)\
**Post date:** [March 15, 2023, 4:25am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/10 "2023-03-15T04:25:27Z")

</div>

Hi @ioannis Thanks for your reply. I am using simple prompts like what is python, what is thunkable etc. I am getting undefined as the response. I am trying to connect to OpenAi support also but they have not responded till now. I am copy pasting the issue I sent to them here as well, May be you can help me with it . (Disclaimer :Since I am handling the curriculum dept so I need to figure it out for my team.)

_" I signed up for OpenAI and used it’s API key in one of my Thunkable projects with email id no 1. On March 13, I created one more account in OpenAI for my colleague in my device with email id no 2, to use API key for another Thunkable project . This new account API keys are not working for their Thunkable projects but my old ones are still working in my projects. I didn’t put any credit card information in either of them, also I didn’t pay anything. Can you please help why the new account API is not working… They both use different email id as user id, only the device was same, the phone number was also different. "_

I have tried to open the Thunkable project in other device also. There also its not working.

---

<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:** [March 15, 2023, 7:50pm UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/11 "2023-03-15T19:50:03Z")

</div>

Could you please check API usage [OpenAI API](https://platform.openai.com/account/usage)  
This way we will see if the API is called and when it expires.

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

You can also test your account on Playground

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/c/6c401b1a7b85ae2eef9a2fdbe2f5ca8ebb20352b.png)

---

<div class="post-metadata">

**Author:** ![cseducator\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@cseducator\_mindchamp](https://community.thunkable.com/u/cseducator_mindchamp)\
**Post date:** [March 16, 2023, 5:55am UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/12 "2023-03-16T05:55:19Z")

</div>

Thank you @ioannis . These are my screenshots, I somehow feel that they have made it paid for the new accounts.

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

I found this in the FAQ [ChatGPT API FAQ | OpenAI Help Center](https://help.openai.com/en/articles/7039783-chatgpt-api-faq)  
The first question has something for free trial users but further below that it says ChatGPT API is not free.

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

---

<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:** [March 16, 2023, 12:39pm UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/13 "2023-03-16T12:39:04Z")

</div>

It seems that you do not have any credits on your account.  
In order to use the OpenAI feature on Thunkable you need to add a valid API key.  
For more accurate info in ChatGPT it is better to wait for their customer support answer.

---

<div class="post-metadata">

**Author:** ![cseducator\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@cseducator\_mindchamp](https://community.thunkable.com/u/cseducator_mindchamp)\
**Post date:** [March 17, 2023, 2:08pm UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/14 "2023-03-17T14:08:01Z")

</div>

Well they have not reverted yet, sent a reminder also.

Thank you so much for the help and your time here at Thunkable Community.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 15, 2023, 2:08pm UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/15 "2023-06-15T14:08:04Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [December 19, 2024, 4:59pm UTC](https://community.thunkable.com/t/openai-chatgpt-api-key-not-working/2321167/16 "2024-12-19T16:59:59Z")

</div>


