> For the complete documentation index, see [llms.txt](https://docs.helpyousponsor.com/guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.helpyousponsor.com/guides/advanced-features/integrations/box-image-storage.md).

# Box Image Storage

Gratona’s default configuration enables you to store images for both donors and sponsorship entities. All uploaded files are automatically resized to 500px, which is ideal for online use and minimizes page load times. However, if you need larger files, we’ve integrated with Box.com to allow you to store full-size images alongside the 500px version in Gratona.

### Box.com Setup

First, [create a Box account](https://box.com/). Direct links are a premium feature; review Box's current [shared-link settings guidance](https://support.box.com/hc/en-us/articles/360043697554-Configuring-Individual-Shared-Link-Settings) to confirm your plan supports them.

After verifying your Box account, go to [developers.box.com](https://developers.box.com/) and create a “Box Content App.”

Click on “Get Started,” then select “Box Content,” and give your app a name (any name you like).

<figure><img src="https://3474867315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtvGkHqkxF65IiEXi3vz%2Fuploads%2FOvw9OC1vCAdVE5WwxknB%2FBox%20save.png?alt=media&#x26;token=a5149f80-46d3-46a8-9243-a5c0e05d54a2" alt="Box save.png"><figcaption><p>Box save.png</p></figcaption></figure>

Click “**Create Application**” and then proceed by clicking on “Configure Application.”

You’ll then see the configuration page. Don’t worry about making any changes here!

Box.com might require you to input a **redirect\_url** parameter. The required redirect URL is:

***<https://app.helpyousponsor.com/admin/box\\_response>***

(If you have a custom Gratona URL, adjust the beginning of the URL accordingly.)

Next, find the **client\_id** (also known as API key) and the **client\_secret** fields. Make sure to note them down, as you’ll need them later.

<figure><img src="https://3474867315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtvGkHqkxF65IiEXi3vz%2Fuploads%2FaGwr6hzvoD42Ci1o3Ywv%2Fclient_secret%20fields.png?alt=media&#x26;token=02b3bb02-e31c-4adc-941f-d41cb237e5da" alt="client secret fields.png"><figcaption><p>client secret fields.png</p></figcaption></figure>

3\. The explanation is a [bit technical](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), but you’ll also need to contact Box support to set up CORS.

Once you have your client\_id (API key), write an email to <api@box.com>.

You’ll need two things:

* Your client\_id (API key)
* Your domain name

Your Gratona domain will vary depending on your individual setup.

To find your domain, simply log in to your admin login and look at the address bar.

<figure><img src="/files/6Cj33wopq8BckhWvK9Xu" alt="image 2023 05 24 145726115"><figcaption><p>image 2023 05 24 145726115</p></figcaption></figure>

For the native Gratona app, the domain is **`app.helpyousponsor.com`**.

Your email should look similar to this:

> ***"We are using a box.com integrated application that needs CORS support enabled.***
>
> ***Our client\_id (API Key) is : (Insert your client\_id here)***
>
> ***Please enable CORS on our app for the following domains:***
>
> ***<https://your-domain.example>***
>
> ***https\:// (insert our domain here)***
>
> ***Thank You!"***

It may take a day or two for Box.com support to get back to you to let you know they have activated CORS for your domain.

Then, go to add a file. It will redirect you to box.com's login page, and ask for your to 'grant access' to Gratona. Click "grant" and it will put you back on the dashboard.

If there is a redirect\_url\_mismatch error, make sure to login to Gratona with HTTPS:// rather than HTTP://

Now, go to add a file again, and you will see an orange bordered drop-zone area where you can drag files.

### Gratona Configuration

Now, you will need to login to your Gratona admin account.

Open **Integrations** from the main navigation.

Click on "**View integration**" on the "Box" card which will open up a drawer to fill in the required information.

<figure><img src="/files/HOwgIAvkaeMrx4W9aO65" alt="Gratona screen" width="375"><figcaption><p>Gratona screen</p></figcaption></figure>

Here fill in the "**client\_secret"** from your box account in the "**Private key"** field **client\_id** in the "**Public key"** field and click "**Update**".
