# S3 access private images

**URL:** <https://community.dreamfactory.com/t/s3-access-private-images/992>\
**Category:** Client SDKs\
**Created:** [April 10, 2015, 4:04pm UTC](https://community.dreamfactory.com/t/s3-access-private-images/992 "2015-04-10T16:04:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![manol](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@manol](https://community.dreamfactory.com/u/manol)\
**Post date:** [April 10, 2015, 4:04pm UTC](https://community.dreamfactory.com/t/s3-access-private-images/992/1 "2015-04-10T16:04:31Z")

</div>

Hi there.

```
I've connected to a S3 bucket and can get info with df api.

My problem is when I get the source of the images and try show them it gives me access denied because the bucket is private.

```

What Am I missing in my S3 bucket config?

Thank you.

---

<div class="post-metadata">

**Author:** ![manol](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@manol](https://community.dreamfactory.com/u/manol)\
**Post date:** [April 13, 2015, 12:48pm UTC](https://community.dreamfactory.com/t/s3-access-private-images/992/2 "2015-04-13T12:48:07Z")

</div>

I’ve already logged to S3 through dreamfactory and angularjs. I can get images within a folder and log their paths, but when I try to show them within an img tag it keeps telling me 403 (Forbidden).

Any ideas?, thank you.

---

<div class="post-metadata">

**Author:** ![manol](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@manol](https://community.dreamfactory.com/u/manol)\
**Post date:** [April 14, 2015, 10:46pm UTC](https://community.dreamfactory.com/t/s3-access-private-images/992/3 "2015-04-14T22:46:22Z")

</div>

I know I can set bucket policy to allow only certain domains to access the content ([example.com](http://example.com)), but I’m trying to use it with phonegap, any hints?

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [April 20, 2015, 6:13pm UTC](https://community.dreamfactory.com/t/s3-access-private-images/992/4 "2015-04-20T18:13:17Z")

</div>

I will check with our engineers to see if anyone has hints for you on displaying images from S3 via AngularJS. In the meantime, what is being logged in your DSP’s logs when you make these API calls and get 403 responses? Are you able to access these images via the API Docs? Are you able to access some files and not others, or files in some buckets but not other buckets?

---

<div class="post-metadata">

**Author:** ![manol](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@manol](https://community.dreamfactory.com/u/manol)\
**Post date:** [April 23, 2015, 9:35pm UTC](https://community.dreamfactory.com/t/s3-access-private-images/992/5 "2015-04-23T21:35:38Z")

</div>

Hello Jeffrey, yes as you pointed I get all I need with the API but not when I try to use the urls in the html.

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [May 4, 2015, 7:12pm UTC](https://community.dreamfactory.com/t/s3-access-private-images/992/6 "2015-05-04T19:12:44Z")

</div>

I’m sorry that I don’t have the necessary experience implementing in AngularJS to assist you further. This is beyond the scope of DSP itself, but I’d still like to help. One of our engineers had used PhoneGap in the past, and recalled something about whitelisting an external site before you can use it. Perhaps these links will help:

[http://stackoverflow.com/questions/9889872/display-an-image-from-external-url-using-phonegap-jquery-for-android](http://stackoverflow.com/questions/9889872/display-an-image-from-external-url-using-phonegap-jquery-for-android)

[http://docs.phonegap.com/en/1.9.0/guide\_whitelist\_index.md.html](http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html)
