# Box.com API authentication

**URL:** <https://forum.bubble.io/t/box-com-api-authentication/157142>\
**Category:** APIs\
**Created:** [June 24, 2021, 5:10am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142 "2021-06-24T05:10:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![davis.systems](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davis.systems/32/37665_2.png) [@davis.systems](https://forum.bubble.io/u/davis.systems)\
**Post date:** [June 24, 2021, 5:10am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/1 "2021-06-24T05:10:22Z")

</div>

Hi, I’ve seen several posts in the forum about [Box.com](http://Box.com) plugins and API service, however I am not sure they are current or address my problem specifically.

**Has anyone successfully configured a [Box.com](http://Box.com) JWT account to be used via the Bubble API Connector plugin?**

_Background:_  
I am using the Bubble published [Box.com](http://Box.com) plugin for file storage generally, and have also got the Zeroqode service account plugin working, but the problem I have is that either because each plugin authenticates differently or the Zeroqode plugin uses a services account, [Box.com](http://Box.com) treats them differently and they don’t have permissions to “see” each others files (nor is there a way to change that - but I would be happy to stand corrected!), and neither plugin seems to really support the way the other accesses [Box.com](http://Box.com) folders (Bubble plugin seems to search for folders by name and Zeroqode by id and there is zero crossover between them - again, I’d be happy to stand corrected).

My client is too embedded with the Bubble plugin now - over 4GB uploaded to [Box.com](http://Box.com) via this account now, however I need to extend the functionality beyond what this plugin provides for existing folders and files - features the Zeroqode plugin tantalisingly offers, with the exception of the sharing issue above which I can’t get around.

_Solution Options:_

1. Discover I am missing something with these plugins and stand corrected on my points above

2. Work with the plugin publishers to get functionality extended to add the sharing/search features I need (seems unlikely)

3. Forget trying to use the Zeroqode plugin, and configure the [Box.com](http://Box.com) API Connector plugin to reuse the [Box.com](http://Box.com) app authentication being used by my Bubble [Box.com](http://Box.com) plugin and start access existing files in my Box account using direct API calls.

_Problem:_  
It seems like option 3 is my best bet, but I just can’t figure out how to configure the API Connector to use the same app authentication as the Bubble published plugin.

If there is anyone smarter than me at API authentication and using the API Connector plugin and can solve this - I’d love to hear from you.

Or if you have another solution option entirely, I’d also love to hear from you!

---

<div class="post-metadata">

**Author:** ![davis.systems](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davis.systems/32/37665_2.png) [@davis.systems](https://forum.bubble.io/u/davis.systems)\
**Post date:** [June 25, 2021, 3:09am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/2 "2021-06-25T03:09:50Z")

</div>

Bumping in the hope there is someone out there who just hasn’t logged in to see this yet.

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [June 25, 2021, 7:18am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/3 "2021-06-25T07:18:41Z")

</div>

> [@davis.systems](#):
>
> but I just can’t figure out how to configure the API Connector to use the same app authentication as the Bubble published plugin.

I’d recommend this option, but if you’re a beginner you might want to do some digging into the API connector and [Box.com](http://Box.com)’s API documentation.

---

<div class="post-metadata">

**Author:** ![davis.systems](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davis.systems/32/37665_2.png) [@davis.systems](https://forum.bubble.io/u/davis.systems)\
**Post date:** [June 26, 2021, 5:33am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/4 "2021-06-26T05:33:46Z")

</div>

Sound advice @johnny. I went through the [box.com](http://box.com) authentication guide and focussed on the JWT Auth ([https://developer.box.com/guides/authentication/jwt/](https://developer.box.com/guides/authentication/jwt/)) as this is what I have already the Bubble published plugin uses ( [BOX Plugin Instructions - Tips - Bubble Forum](http://forum.bubble.io/t/box-plugin-instructions/13310)) as per the screenshot below.

As you can see from the [Box.com](http://Box.com) documentation, the first decision is whether we are using the SDK or not. I’m guessing not SDK as the SDK method seem to read the entire JWT config in and provide methods to generate a token without needing to do much more, but the API Connector plugin requires more detail as per this screenshot:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/7/7/77639bbed221863b838a6beb360960439c3ed78c.png)

So, assuming we need to following the [non-SDK path](https://developer.box.com/guides/authentication/jwt/without-sdk/) we need to provide either a public and private keypair OR a client id and client secret. As per the screenshot above, it looks like we are using the public/private keypair path.

So, as per the documentation:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/7/e/7eed91b1b60328a656be46fcd9dc3bd0a5351acf.png)

…all prereqs have been met in order to configure the [Box.com](http://Box.com) plugin!!

The question is how to apply the fields in the config.json file to our API Connector JWT auth?

Private Key is the only really obvious field.

How about:

- Scope? Is this the same as publicKeyId?
- Iss (account email)? Am guessing this is the same email as used on the admin account the owns the JWT application in [Box.com](http://Box.com)?
- Access token endpoint? Am guessing this is the URL of the Bubble application I am building?

I’ve tried lots of different combinations in these fields without much luck and I’m finding the [Box.com](http://Box.com) API guide not much help from here as it offers a lot of coding examples and I don’t really know how the API Connector plugin is coded…

Any ideas? Anyone interested in helping me solve this? Would be happy to pay for time at this point.

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [June 26, 2021, 6:50am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/5 "2021-06-26T06:50:16Z")

</div>

Hmm… I’m not the best at APIs, perhaps @Jici could help?

---

<div class="post-metadata">

**Author:** ![davis.systems](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davis.systems/32/37665_2.png) [@davis.systems](https://forum.bubble.io/u/davis.systems)\
**Post date:** [June 28, 2021, 5:00am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/6 "2021-06-28T05:00:50Z")

</div>

Bumping again and adding @emmanuel hoping someone from the Bubble team can offer some guidance.

---

<div class="post-metadata">

**Author:** ![davis.systems](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davis.systems/32/37665_2.png) [@davis.systems](https://forum.bubble.io/u/davis.systems)\
**Post date:** [June 28, 2021, 5:56am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/7 "2021-06-28T05:56:56Z")

</div>

Actually, I have found a post covering the exact same issue from three years ago:

[Box - API Connector JWT Authentication “Invalid Client Credentials”, “No Start Line”, “Wrong Tag” - Need help - Bubble Forum](http://forum.bubble.io/t/box-api-connector-jwt-authentication-invalid-client-credentials-no-start-line-wrong-tag/16561)

No response from Bubble then - perhaps some assistance this time around given the standard of the documentation for JWT configuration in the API Connector plugin documentation:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/9/1943f0a4b1c42c09a86067bd7c32819f39fb3141.png)

---

<div class="post-metadata">

**Author:** ![davis.systems](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davis.systems/32/37665_2.png) [@davis.systems](https://forum.bubble.io/u/davis.systems)\
**Post date:** [June 28, 2021, 6:16am UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/8 "2021-06-28T06:16:44Z")

</div>

@greg.nallie - I’d be keen to chat to you further about your solution from your post also if you’re still around and happy to share.

---

<div class="post-metadata">

**Author:** ![greg.nallie](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/greg.nallie/32/15095_2.png) [@greg.nallie](https://forum.bubble.io/u/greg.nallie)\
**Post date:** [June 28, 2021, 3:36pm UTC](https://forum.bubble.io/t/box-com-api-authentication/157142/10 "2021-06-28T15:36:30Z")

</div>

I gave up and used something simpler instead… hopefully Bubble has developed around it by now or can offer some additional help, sorry I can’t help further.
