Skip to main content

Good morning, i'm trying to create a ticket calling the api v2 (php with attachments)

But it return all time error 500 without any explanation, the request id is:

X-Request-Id:  647b2819-0e25-41c1-affd-e76380b93b2d


Rest Error: Internal Server Error - API StatusCode: 500 - API Detailed Error Message: {"code":"internal_error","message":"We're sorry, but something went wrong."}


Can you give any feedback?

Hi @jgarcia13456,

 

Greetings from Freshworks Community!

 

I understand that you’re using PHP to create Freshdesk tickets via API. Here are few sample PHP codes on how attachments can be handled for an API call:

https://github.com/freshworks/fresh-samples/tree/master/PHP

 

Please refer to our API documentation for more details on other languages. You can find similar code samples here:

https://developers.freshdesk.com/api/#code_samples

 

Please note that if you’re making an API call with attachments, the Content-Type should always be “multipart/form-data”. You can refer to this detailed API documentation on Attachments for more details:

https://developers.freshdesk.com/api/#attachments

 

Cheers!


For everyone who comes here looking for a solution. In my case the problem was that if several attachments are included both have the id attachments[]


Reply