What is the correct JSON payload format for creating WebRTC phones?

I want to create a WebRTC phone through API requests but every time I make the request it always sends back this error:

'message': 'The request could not be understood by the server due to malformed syntax.', 'code': 'bad.request', 'status': 400, 'contextId': '', 'details': [], 'errors': []

I have tried:

  • filling out the example JSON payload in the API Explorer and sending that
  • getting an already existing phone, seeing what fields are filled out, and filling those out with the new phone's info and sending that for a payload instead.
  • Checking the endpoint is the correct one (https://api.{ENVIRONMENT}/api/v2/telephony/providers/edges/phones))
  • Checking my headers (I have the authentication and Content-type headers filled out)
  • Checking the permissions/roles in my OAuth credentials to make sure I have the telephony:plugin:all perm.

Is there something I am missing here? I know it's not the format of the request (Using python) because I've switched the endpoints and payloads to do other things such as create users and it works just fine. So my guess is there must be something missing in the payload that's not creating the phone.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.