# Chat GPT for Glide

**URL:** <https://community.glideapps.com/t/chat-gpt-for-glide/57134>\
**Category:** Ask for Help\
**Created:** [January 26, 2023, 11:11am UTC](https://community.glideapps.com/t/chat-gpt-for-glide/57134 "2023-01-26T11:11:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 26, 2023, 11:11am UTC](https://community.glideapps.com/t/chat-gpt-for-glide/57134/1 "2023-01-26T11:11:50Z")

</div>

Is there someone with Java experience that can verify this looks possible?

So I asked Chat GPT how I could access Chat GPT using an API in Glide Apps

It responded with this:

1. First, you’ll need to sign up for an API key on the OpenAI website.
2. Once you have your API key, you can use it to make API requests to the GPT-3 endpoint. For example, you can use the following code snippet in Glide app to generate text based on a given prompt:
3. You can then use the generated text in your Glide app by displaying it in a text field or using it in some other way.

image.jpg​

 ![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/c/ec073f65337bb783094727ec52adf913be6196af.jpeg)

I have no experience with using Java columns. I wondered if there is an expert that can say ‘ok, this could work’! Moreover, could they create a test version and share the results?

---

<div class="post-metadata">

**Author:** ![glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glide/32/53398_2.png) [@glide](https://community.glideapps.com/u/glide)\
**Post date:** [January 26, 2023, 11:11am UTC](https://community.glideapps.com/t/chat-gpt-for-glide/57134/2 "2023-01-26T11:11:54Z")

</div>

Unfortunately, I’m not an expert in Java, so I can’t verify if this is possible. However, I can suggest that you reach out to the Glide community for help. You can find a list of helpful resources here: [Glide Community - Creating amazing apps without code.](https://glideapps.com/community). Good luck!

This link could be useful: [https://www.glideapps.com/templates/hSSgN4PNLu25Y5YONglT-template](https://www.glideapps.com/templates/hSSgN4PNLu25Y5YONglT-template)

_This is an experimental automatic reply from a bot. Please like it if the answer is correct._

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 26, 2023, 11:21am UTC](https://community.glideapps.com/t/chat-gpt-for-glide/57134/3 "2023-01-26T11:21:08Z")

</div>

It’s actually given you some Apps Script code (`UrlFetchApp` is an Apps Script method), which is a flavour of JavaScript, which is definitely not Java. Java & JavaScript are two very different animals 🙂

Anyway, that won’t work as it is in a JavaScript column.

It would however be possible to craft some JavaScript that would work. Not something I’ve attempted to do yet (just one thing on a very long list of things I’d like to play with), but somebody else might have.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [January 26, 2023, 11:12pm UTC](https://community.glideapps.com/t/chat-gpt-for-glide/57134/4 "2023-01-26T23:12:02Z")

</div>

Hola @Simon_Hill

You can try with this syntax, this should work using JavaScript plugin:

> [@Fetch json with token](https://community.glideapps.com/t/fetch-json-with-token/53097/7):
>
> Hola! I think it’s possible but if you share your cURL command (or Fetch syntax) we can try to fix it. Your JS code might look like: var data= await fetch('YOUR\_URL', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'YOUR\_BearerToken' }, }); const json = await data.text(); // or data.json(); return json Saludos!

Saludos!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [January 27, 2023, 11:12pm UTC](https://community.glideapps.com/t/chat-gpt-for-glide/57134/5 "2023-01-27T23:12:08Z")

</div>

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