Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to send messages with attachments via API? #964

Open
sooluh opened this issue Sep 9, 2021 · 1 comment
Open

Is it possible to send messages with attachments via API? #964

sooluh opened this issue Sep 9, 2021 · 1 comment

Comments

@sooluh
Copy link

sooluh commented Sep 9, 2021

As you guys know, I'm building a PHP library for Papercups. I'm also building an app and making use of this Papercups, but I paused when I didn't know how to upload an attachment and send it at the same time.

I tried monitoring Network on DevTools and found /api/upload, and I managed to write code like here and here.

With that function I get a response like this

{
  "content_type": "image/jpeg",
  "file_url": "https://papercups-files-test.s3.amazonaws.com/...",
  "filename": "...",
  "id": "fb15ed9c-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "object": "file"
}

Then I tried to send a message with an additional key, namely "attachments" with the resulting value from the json above, but when the webhook arrived on my server, the attachment only contained an empty array and on the Papercups dashboard there was no attachment.

Are attachments not supported for the API yet?
Thank you😀

@reichert621
Copy link
Collaborator

at the moment this is not possible, but we'll fix it soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants