# File message unauthorized

**URL:** <https://community.sendbird.com/t/file-message-unauthorized/935>\
**Category:** Sendbird Chat API/SDK\
**Tags:** group-channel, react-js, chatsdk\
**Created:** [September 11, 2020, 11:10am UTC](https://community.sendbird.com/t/file-message-unauthorized/935 "2020-09-11T11:10:07Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taimoor\_Tariq](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/taimoor_tariq/32/462_2.png) [@Taimoor\_Tariq](https://community.sendbird.com/u/Taimoor_Tariq)\
**Post date:** [September 11, 2020, 11:10am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/1 "2020-09-11T11:10:07Z")

</div>

when I send a file message and after the message sent to send bird the return message object that sends bird returns the object has a property called plain URL when I open the URL in the browser its give me an unauthorized error any solution

---

<div class="post-metadata">

**Author:** ![Chin\_Chin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/chin_chin/32/476_2.png) [@Chin\_Chin](https://community.sendbird.com/u/Chin_Chin)\
**Post date:** [September 11, 2020, 10:09pm UTC](https://community.sendbird.com/t/file-message-unauthorized/935/2 "2020-09-11T22:09:24Z")

</div>

I have the same problem. When i develop sendbird chat on web. I retrieve property url in \_sender but react native not

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [September 12, 2020, 4:04am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/3 "2020-09-12T04:04:11Z")

</div>

@Taimoor_Tariq

Hi there. Just to mention that by default all new Sendbird apps provide file encryption. This means that your file url also requires authentication to be accessible. There are details explaining how it works [here](https://docs.sendbird.com/javascript/group_channel_advanced#3_share_an_encrypted_file_with_other_members).  
Please let me know if this doesn’t solve your problem. 🙂

---

<div class="post-metadata">

**Author:** ![Taimoor\_Tariq](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/taimoor_tariq/32/462_2.png) [@Taimoor\_Tariq](https://community.sendbird.com/u/Taimoor_Tariq)\
**Post date:** [September 12, 2020, 2:53pm UTC](https://community.sendbird.com/t/file-message-unauthorized/935/4 "2020-09-12T14:53:10Z")

</div>

@Jason where I got this auth in the message object ? or when user connect to send bird server and got the response object from send bird ?

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [September 13, 2020, 11:52pm UTC](https://community.sendbird.com/t/file-message-unauthorized/935/5 "2020-09-13T23:52:37Z")

</div>

@Taimoor_Tariq

When the user connects to Sendbird to fetch the FILE message the returned FILE message object will include the image url with the auth token included as a param. The file url looks something like this:

[https://file-us-1.sendbird.com/f9196f01d7134767a6575355329c54dc.jpg?auth=3UrR9uQUcPIwHPwZBDY4nhffwpQI774VHpcuJh-rE\_jXtxJ5U5-Hwr3ByXiS-jznigPlGYmbIGqJMhDmhOCylQ](https://file-us-1.sendbird.com/f9196f01d7134767a6575355329c54dc.jpg?auth=3UrR9uQUcPIwHPwZBDY4nhffwpQI774VHpcuJh-rE_jXtxJ5U5-Hwr3ByXiS-jznigPlGYmbIGqJMhDmhOCylQ)

---

<div class="post-metadata">

**Author:** ![Chin\_Chin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/chin_chin/32/476_2.png) [@Chin\_Chin](https://community.sendbird.com/u/Chin_Chin)\
**Post date:** [September 14, 2020, 3:10am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/6 "2020-09-14T03:10:32Z")

</div>

Thank a lot for your replying. This is my console.log for response. My react native app never get properties like before.

 ![Screen Shot 2020-09-14 at 10.08.45 AM](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/1X/f24b3ca1cc235c58c88fc13465f4854287a7cc43.png)

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [September 14, 2020, 4:20am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/7 "2020-09-14T04:20:39Z")

</div>

@Chin_Chin @Taimoor_Tariq

Something is not right. I’m working with our engineers to find out the problem. I will keep you posted.

---

<div class="post-metadata">

**Author:** ![Taimoor\_Tariq](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/taimoor_tariq/32/462_2.png) [@Taimoor\_Tariq](https://community.sendbird.com/u/Taimoor_Tariq)\
**Post date:** [September 14, 2020, 7:22am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/8 "2020-09-14T07:22:49Z")

</div>

Ok @Jason i m waiting for your reply , thanks

---

<div class="post-metadata">

**Author:** ![Taimoor\_Tariq](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/taimoor_tariq/32/462_2.png) [@Taimoor\_Tariq](https://community.sendbird.com/u/Taimoor_Tariq)\
**Post date:** [September 14, 2020, 10:02am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/9 "2020-09-14T10:02:51Z")

</div>

During the call can we use the share screen feature as well?

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [September 14, 2020, 11:24am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/10 "2020-09-14T11:24:45Z")

</div>

@Taimoor_Tariq @Chin_Chin

I found out more about the plainUrl. If your Sendbird application doesn’t have file encryption turned on your will see the plainUrl field. Please let me know you app\_id via direct messages if you would like file encryption turn on.

Furthermore, it turns out the incoming message model is not the same as the model processed by the SDK. It means you can still get `message.url` within the scope of the SDK. It happens that the raw message model in the console shows plainUrl.

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [September 14, 2020, 11:28am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/11 "2020-09-14T11:28:53Z")

</div>

@Taimoor_Tariq

Currently the Sendbird Calls SDK doesn’t include screen sharing. It’s on the Roadmap but isn’t available yet.

---

<div class="post-metadata">

**Author:** ![Taimoor\_Tariq](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/taimoor_tariq/32/462_2.png) [@Taimoor\_Tariq](https://community.sendbird.com/u/Taimoor_Tariq)\
**Post date:** [September 14, 2020, 12:54pm UTC](https://community.sendbird.com/t/file-message-unauthorized/935/12 "2020-09-14T12:54:41Z")

</div>

@Jason I already have the plain URL but when I try to open that URL on the browser, it returns the `Not authorized` error.  
The actual object is in the attachment below

 ![image](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/1X/aaf6a497dd5f3294bc6b80df8897560f0cf1078a.png)

---

<div class="post-metadata">

**Author:** ![Chin\_Chin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/chin_chin/32/476_2.png) [@Chin\_Chin](https://community.sendbird.com/u/Chin_Chin)\
**Post date:** [September 15, 2020, 10:18am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/13 "2020-09-15T10:18:23Z")

</div>

i solved this problem but not clean create Channel with platform api, and call messages will be show url in thumnails. I dont know why but it works without property url

---

<div class="post-metadata">

**Author:** ![Taimoor\_Tariq](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/taimoor_tariq/32/462_2.png) [@Taimoor\_Tariq](https://community.sendbird.com/u/Taimoor_Tariq)\
**Post date:** [September 15, 2020, 11:45am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/14 "2020-09-15T11:45:18Z")

</div>

but when you send other types of data like pdf, docs, etc then you have an empty thumbnail array and how would you handle this scenario?

---

<div class="post-metadata">

**Author:** ![Taimoor\_Tariq](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/taimoor_tariq/32/462_2.png) [@Taimoor\_Tariq](https://community.sendbird.com/u/Taimoor_Tariq)\
**Post date:** [September 15, 2020, 1:53pm UTC](https://community.sendbird.com/t/file-message-unauthorized/935/15 "2020-09-15T13:53:48Z")

</div>

Any Update @Jason about the File message unauthorized issue

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [September 16, 2020, 4:25am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/16 "2020-09-16T04:25:26Z")

</div>

@Taimoor_Tariq with an empty thumbnails array I would look at the `file.type` and render a small image that represents that file type.

Regarding the issue with plainUrl. Please can you direct message me your Sendbird application\_id. You can find it in your Sendbird Dashboard under `Overview`. I will check if you have file encryption turned on.

---

<div class="post-metadata">

**Author:** ![Taimoor\_Tariq](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/taimoor_tariq/32/462_2.png) [@Taimoor\_Tariq](https://community.sendbird.com/u/Taimoor_Tariq)\
**Post date:** [September 17, 2020, 6:27am UTC](https://community.sendbird.com/t/file-message-unauthorized/935/17 "2020-09-17T06:27:08Z")

</div>

@Jason did you got the application\_id I send you in direct message

---

<div class="post-metadata">

**Author:** ![Evgeniya\_Zaikina](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/evgeniya_zaikina/32/618_2.png) [@Evgeniya\_Zaikina](https://community.sendbird.com/u/Evgeniya_Zaikina)\
**Post date:** [October 21, 2020, 1:27pm UTC](https://community.sendbird.com/t/file-message-unauthorized/935/18 "2020-10-21T13:27:35Z")

</div>

Hi, Did you resolve this? how?

---

<div class="post-metadata">

**Author:** ![Nitin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/nitin/32/2779_2.png) [@Nitin](https://community.sendbird.com/u/Nitin)\
**Post date:** [August 23, 2022, 1:17pm UTC](https://community.sendbird.com/t/file-message-unauthorized/935/19 "2022-08-23T13:17:01Z")

</div>

I’m still getting this issue but only when i’m receiving message first time or sending file messages. After refresh i’m getting the `url` key and able to view the image.
