0

I am getting an invalid argument with the following API Call (following https://developers.google.com/nest/device-access/api/doorbell-battery#webrtc):

curl -X POST   'https://smartdevicemanagement.googleapis.com/v1/enterprises/projectID/devices/deviceID:executeCommand'   -H 'Content-Type: application/json'   
-H 'Authorization: AUTHTOKEN'   --data-raw '{
    "command" : "sdm.devices.commands.CameraLiveStream.GenerateWebRtcStream",
    "params" : {
            "offerSdp" : "a=recvonly"
          }
    }'

Response from server:

{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT"
  }
}

What is the invalid argument?

Donnald Cucharo
  • 3,866
  • 1
  • 10
  • 17
john
  • 131
  • 7

2 Answers2

2

My impression is that is not a valid offer, and you need to use a web rtc client to create it. See webrtc.org for examples.

allenporter
  • 361
  • 1
  • 4
0

"offerSdp" : "a=recvonly" isn't a valid offer, but also you will get that INVALID_ARGUMENT error if you don't end your offer string with a \r\n character.

Gothic
  • 322
  • 3
  • 12