# Load file from google drive?

**URL:** https://discourse.processing.org/t/load-file-from-google-drive/41211
**Category:** Coding Questions
**Created:** [March 9, 2023, 2:49pm UTC](https://discourse.processing.org/t/load-file-from-google-drive/41211 "2023-03-09T14:49:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Aryszin](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aryszin](https://discourse.processing.org/u/Aryszin)
#### Post date: [March 9, 2023, 2:49pm UTC](https://discourse.processing.org/t/load-file-from-google-drive/41211/1 "2023-03-09T14:49:08Z")

</div>

I have an sfdat or sftext (txt but more options) file in drive & want to load it into my software. How could this be done? :£ Arys

---

<div class="post-metadata">

### Author: ![Aryszin](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aryszin](https://discourse.processing.org/u/Aryszin)
#### Post date: [March 9, 2023, 2:55pm UTC](https://discourse.processing.org/t/load-file-from-google-drive/41211/2 "2023-03-09T14:55:00Z")

</div>

```auto
<header-img: '/header.png'>
<title-text: '&size:24"Text here lol"'
<down-text: '&size:14"Text here lol"'

```

this is the stuff in the file, heres a link

> **[news.sftxt](https://drive.google.com/file/d/1LzkFQvtms445j6fK5CygKzFghFd7W4sI/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [March 9, 2023, 4:40pm UTC](https://discourse.processing.org/t/load-file-from-google-drive/41211/3 "2023-03-09T16:40:29Z")

</div>

Hi @Aryszin,

You should be able to do it with the Google Drive API (using REST HTTP requests):

> <https://stackoverflow.com/questions/39381563/get-file-content-of-google-docs-using-google-drive-api-v3>

> **[Files: get  |  Google Drive  |  Google Developers](https://developers.google.com/drive/api/v3/reference/files/get?hl=hi)**

> **[Files: export  |  Google Drive  |  Google Developers](https://developers.google.com/drive/api/v3/reference/files/export)**

Then do an [HTTP request with Java](https://www.baeldung.com/java-http-request) to get the content of your file.

---

<div class="post-metadata">

### Author: ![Aryszin](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aryszin](https://discourse.processing.org/u/Aryszin)
#### Post date: [March 10, 2023, 12:20pm UTC](https://discourse.processing.org/t/load-file-from-google-drive/41211/4 "2023-03-10T12:20:36Z")

</div>

i dont know how to read a txt, it spits out a json & i dont know how to get the api key!
