Not authorized File Message

Dear Sir,

I am not able to access file messages from chat SDK when I retrieve the response It shows Not Authorized. I am trying to fetch images in an open channel.

Hey @adarsh_sharma,

Welcome to the Sendbird Community. we’re happy you’re here! When you’re accessing the URL, are you accessing the signed url with the auth key attached to it? If not, you won’t be able to access the file.

-Tyler

@Tyler I am not getting the auth token in url. How can I get the file url with auth token… I read the solution from other question. It says we have request_auth params while sending file messages but It can only be changed my internal global setting. I don’t know what to do. please help me with this issue.

Help me with issue sir.

even I am giving the acces token permission to read & write

I apologize for the delayed response. Can you provide me with the object that is returned to you by Sendbird?

Thanks,
Tyler

Thanks for your response … see the response

{
        "_sender": {
            "_preferredLanguages": null,
            "connectionStatus": "nonavailable",
            "friendDiscoveryKey": null,
            "friendName": null,
            "isActive": true,
            "isBlockedByMe": false,
            "lastSeenAt": 0,
            "metaData": [
                "Object"
            ],
            "nickname": "",
            "plainProfileUrl": "",
            "requireAuth": false,
            "role": "operator",
            "userId": "74"
        },
        "channelType": "open",
        "channelUrl": "sendbird_open_channel_9484_4ca68a269183107d45f5e0d92f4034e3fddbebb2",
        "createdAt": 1615636378377,
        "customType": "",
        "data": "",
        "errorCode": 0,
        "isOperatorMessage": true,
        "mentionType": "users",
        "mentionedUsers": [],
        "messageId": 6688723924,
        "messageSurvivalSeconds": -1,
        "messageType": "file",
        "metaArrays": [],
        "name": "image-18356ab2-06d1-4dbc-b019-81e198a0011b.jpg",
        "ogMetaData": null,
        "parentMessageId": 0,
        "parentMessageText": null,
        "plainUrl": "https://file-us-3.sendbird.com/ed3c18a563e14fee81fdc5549b76f992.jpg",
        "reactions": [],
        "reqId": "1615636351644",
        "requestState": "succeeded",
        "requestedMentionUserIds": [],
        "requireAuth": true,
        "sendingStatus": "succeeded",
        "silent": false,
        "size": 3039781,
        "threadInfo": {
            "lastRepliedAt": 0,
            "mostRepliedUsers": [
                "Array"
            ],
            "replyCount": 0,
            "updatedAt": 0
        },
        "thumbnails": [],
        "type": "image/jpeg",
        "updatedAt": 0
    },

hear I am getting plainUrl ehis shows not authorized.