zChat.sendFile() 403 error | Community
Skip to main content

zChat.sendFile() 403 error

  • December 2, 2021
  • 3 replies
  • 0 views

Serg

Hello, what may cause 403 Forbidden error when trying to send image

https://api.zopim.com/web-sdk/#zchat-sendfile-file-callback

 

 

Request URL: https://us40.zopim.com/client/widget/upload?__messageID=2&ts=1638434665584
Request Method: POST
Status Code: 403

env: https://capital1637842213.zendesk.com/

 

3 replies

Serg
  • Author
  • December 3, 2021

I found that zendesk returns 403 when there is no active chat session. The session starts only with a message, not with a file, so if the user decided to send the file as a first 'message' we had to send some 'dummy' message from the user (e.g. Start ), wait a few seconds, and only then send the file.
 


Greg29
  • December 6, 2021

Thanks for that update, Serg. Just so that I can share this with our product team, do you have any use-cases where you would need to have a customer send a file on the first message? I think that there is a good reason to surface the way that we're handling this in general, so as we do that, it could be a good opportunity to review this overall.


Serg
  • Author
  • December 7, 2021

@greg29 customers don't split messages and files, for them -  everything is a message ( text message or file message ). And users may start the chat session with some screenshot or document, and only then write a message.