# Automating PDF Access via API Calls for Login-Restricted Content in Glide Data Tables

**URL:** <https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445>\
**Category:** Ask for Help\
**Created:** [June 12, 2025, 10:17pm UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445 "2025-06-12T22:17:53Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Namra](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Namra](https://community.glideapps.com/u/Namra)\
**Post date:** [June 20, 2025, 9:35am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/22 "2025-06-20T09:35:46Z")

</div>

You mean if our platform offer public URL without headers?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 20, 2025, 9:36am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/23 "2025-06-20T09:36:43Z")

</div>

I mean is there way for you to call the URL, pass some authorization headers in, and then retrieve a public version that allows you to embed.

---

<div class="post-metadata">

**Author:** ![Namra](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Namra](https://community.glideapps.com/u/Namra)\
**Post date:** [June 20, 2025, 9:40am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/24 "2025-06-20T09:40:06Z")

</div>

I am doing exact same thing calling the URL, passed some authorization headers and it should now display pdf and if you see the row is displaying “PDF” but I guess it is binary version of pdf

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/5/c58e3b5a24941606f1eb2a45ff1e2a3cb8078e64.png)

---

<div class="post-metadata">

**Author:** ![Namra](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Namra](https://community.glideapps.com/u/Namra)\
**Post date:** [June 20, 2025, 9:48am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/25 "2025-06-20T09:48:05Z")

</div>

Yes, it is binary version of pdf is there a way to convert binary version to pdf in glide

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/1/f1c2db6024975b035bd538535f5d973809ec95fe.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 20, 2025, 10:03am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/26 "2025-06-20T10:03:39Z")

</div>

I’m not aware of a way to do that. Hopefully someone else can chime in.

---

<div class="post-metadata">

**Author:** ![Namra](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Namra](https://community.glideapps.com/u/Namra)\
**Post date:** [June 20, 2025, 10:06am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/28 "2025-06-20T10:06:02Z")

</div>

Thank you for all the help so far.🙂

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [June 20, 2025, 10:06am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/29 "2025-06-20T10:06:18Z")

</div>

Not sure, but you can try creating some javascript in a javascript column that converts binary to a datauri. At the end of the day, the web embed only works with a public url or a datauri. That’s about it.

---

<div class="post-metadata">

**Author:** ![Namra](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Namra](https://community.glideapps.com/u/Namra)\
**Post date:** [June 20, 2025, 10:12am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/30 "2025-06-20T10:12:15Z")

</div>

by javascript column you mean this

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/d/6dc7594dcd9d6e0d771c349cba25cb36994b7f7c.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [June 20, 2025, 10:13am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/31 "2025-06-20T10:13:03Z")

</div>

yes

---

<div class="post-metadata">

**Author:** ![Namra](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Namra](https://community.glideapps.com/u/Namra)\
**Post date:** [June 20, 2025, 10:44am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/32 "2025-06-20T10:44:39Z")

</div>

> [@Jeff\_Hager](#):
>
> binary to a datauri.

could you please tell me what am I doing wrong here :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/e/ee5ad2d0781745da72a84e3af9418015bfcdc85c.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/4/b4b67a7c3c4c8c3c44190a4875c3cd692e67899f.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [June 20, 2025, 11:32am UTC](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445/33 "2025-06-20T11:32:36Z")

</div>

Not tested, but try this.

```auto
function convertPdfToDataURI(pdfBlobOrArrayBuffer) {

  return new Promise((resolve, reject) => {
    const reader = new FileReader();

    reader.onload = function (event) {
      resolve(event.target.result);
    };

    reader.onerror = function () {
      reject("Error: Failed to read file");
    };

    const blob = pdfBlobOrArrayBuffer instanceof Blob
      ? pdfBlobOrArrayBuffer
      : new Blob([pdfBlobOrArrayBuffer], { type: "application/pdf" });

    reader.readAsDataURL(blob);
  });
}

return await convertPdfToDataURI(p1);

```

[Previous page](https://community.glideapps.com/t/automating-pdf-access-via-api-calls-for-login-restricted-content-in-glide-data-tables/82445.md?page=1)
