RESTful Sensor vs RESTful Command?

I would like to send some sensor data to an endpoint in another platform.

I started by using the RESTful Sensor, which I later realised the payload can’t be templated. So for testing purposes I put some static details in the payload, reloaded, and it arrived immediately at the endpoint.

I then explored the RESTful Command, using a static payload for testing, triggered the service, but in this instance when I check the HA Log the endpoint returned a 403 (forbidden).

Despite these two integrations having different functionality, should they otherwise be sending the payload in the same way?

Below are my two integrations. Again, the Sensor works, the Command does not.
I’m by no means a REST expert, but I have been able to stumble my way through other uses in the past.
Am I misunderstanding the RESTful Command?

  - platform: rest
    resource: <endpoint url>
    method: POST
    payload: '{ "Temperature" : 10.1 }'

    url: <endpoint url>
    method: POST
    payload: '{ "Temperature" : 10.2 }'
1 Like