# Thunkable call to NodeJS encountering 403 forbidden error

**URL:** <https://community.thunkable.com/t/thunkable-call-to-nodejs-encountering-403-forbidden-error/1042002>\
**Category:** Off Topic\
**Created:** [December 31, 2020, 7:31pm UTC](https://community.thunkable.com/t/thunkable-call-to-nodejs-encountering-403-forbidden-error/1042002 "2020-12-31T19:31:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [December 31, 2020, 7:31pm UTC](https://community.thunkable.com/t/thunkable-call-to-nodejs-encountering-403-forbidden-error/1042002/1 "2020-12-31T19:31:44Z")

</div>

@eddie.rebehy, @jared, @cttricks, @jared, @muneer,

I’m having a little trouble with integrating NodeJS with the WebViewer. It is a bit off topic, but it does involve Thunkable integration. So here is my situation:

My ultimate goal it to import a file into thunkable. I have it working on my local emulation of firebase, but I am having trouble getting it to work on the cloud deployment.

The first step is create a listener using express. No problem, works on both deployed and emulated systems.

```
exports.thunk = functions.https.onRequest(app);`
app.listen( () => {
     functions.logger.info(`Express App listening `, {structuredData: true});
});

```

On the get request a display a form. Also works great on deployed and emulated systems.

```
// Display a form for uploading files.
app.get('/', (req, res, next ) => {
  //On a get request, send back this form to the user
  functions.logger.info(`GET request Made`, {structuredData: true});
  res.render('form.pug');
});

```

here is the form.pug

```
doctype html
html(lang="en")
  head
    title Static Files
    meta(charset='utf-8')
    link(rel="stylesheet", href="/static/main.css")
  body
    form(method="POST", action="/upload", enctype="multipart/form-data")
      input(type="file", accept=".gpx", name="file" )
      input(type="submit")

```

Both emulated and deployed systems allow me to identify a file.

`https://us-central1-backroad-discovery-companion.cloudfunctions.net/thunk/`

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

on submit

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

I’m guessing there is some JavaScript / promise / ??? that is causing my problems. Any help is 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:** [December 31, 2020, 8:54pm UTC](https://community.thunkable.com/t/thunkable-call-to-nodejs-encountering-403-forbidden-error/1042002/2 "2020-12-31T20:54:52Z")

</div>

Firebase makes any HTTP function as private not public. From the console change it to public and try.

Happy new year

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [December 31, 2020, 9:04pm UTC](https://community.thunkable.com/t/thunkable-call-to-nodejs-encountering-403-forbidden-error/1042002/3 "2020-12-31T21:04:54Z")

</div>

Thanks. Tried that. No luck. ☹

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [January 1, 2021, 3:18pm UTC](https://community.thunkable.com/t/thunkable-call-to-nodejs-encountering-403-forbidden-error/1042002/4 "2021-01-01T15:18:23Z")

</div>

FYI, i found a much easier way to import a file into thunkable.

> [@Read Text Files Directly into Thunkable](http://community.thunkable.com/t/read-text-files-directly-into-thunkable/1042037):
>
> Statment of the problem As others have [discussed](http://community.thunkable.com/t/thunkable-x-reading-file-from-txt/931562), there is no native way to import a text file into Thunkable. Using the Webviewer Component and [Thunkable(ReactNative) WebExtension](https://docs.thunkable.com/web-viewer) I was able to create a file upload feature with a simple HTML file hosted on the Firebase’s free Web Hosting Setup You could do this on any hosting site. But experienced Thunkers will already have a free Firebase account. Just enable hosting and you now have a site. I set up the site following by [deploying hostin…](http://community.thunkable.com/t/create-your-own-web-api-service-using-firebase-functions-and-nodejs/1040762)

---

<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, 12:19pm UTC](https://community.thunkable.com/t/thunkable-call-to-nodejs-encountering-403-forbidden-error/1042002/5 "2024-11-08T12:19:18Z")

</div>


