question

Dominique Brown avatar image
Dominique Brown asked Dominique Brown commented

Expected HTTP Error: 400 Bad Request (and additional error happened during JSON parse: Response is not JSON) PHP live server

Hi,

I have no idea how to resolve this. Please help.
Basically, it works on local. But on live server, it's giving me error.

This sending fax using PHP SDK

Thanks.

Attachments

code.png

test-live.png

localtest.png




faxphp
localtest.png (68.6 KiB)
test-live.png (64.4 KiB)
code.png (89.3 KiB)
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered Dominique Brown commented

I have no idea what you do. It's weird that your code is in PHP, and the test results you shared were in Postman. And why sharing code in .png image?

1 comment
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi,

I'm calling the API through Postman but the backend is coded in php.

The site doesnt allow me to upload txt or php file that's why I upload image instead.

Can you tell me what's wrong?

I simply follow the codebase here:

https://github.com/ringcentral/ringcentral-php/blob/master/demo/fax.php

and here:

https://developers.ringcentral.com/guide/messaging/fax/sending-faxes


TLDR:
It works on local. Not working live with that error in the title.

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys