facebook-graph-apifacebook-messengerfacebook-messenger-botfacebook-chatbotfacebook-send-api

Messenger chatbot send file


I'd like to send a file to the user, to do so I tried the request below, but it fails.

The docs are not clear about wether is_reusable is compulsory, but the request fails with the same error, even if I include it.

The download url works fine in a browser.

I have https://asd.com/ whitelisted for sure.

Request:

 {
        "recipient": {
            "id": "157..."
        },
        "message": {
            "attachment": {
                "type": "file",
                "payload":
                    {
                        "url":
                            "https://asd.com/s3/..."
                    }
            }
        }
    };

Response: HTTP 500

 {
        "error": {
            "code": 1,
            "message": "An unknown error occurred",
            "error_subcode": 99
        }
    }

Solution

  • The issue is resolved now. I didn't touch the code, so probably it was an error on Facebook's side, as @Josh Cole and HTTP 500 suggested.

    Recently they making quite a few breaking changes... Few days ago they broke all the web views, now the files, whats next?

    I'm marking this question solved.