While Dell redfish allows you to use a single request to subscribe using the user and password header, HPE requests another step.

This command will not work on HPE Redfish. Here are the steps for Dell and HPE: Get auth token:

curl -i X-Auth-Token --insecure --request POST --header "OData-Version: 4.0" --header "Content-Type: application/json" -d '{"UserName": <BMC_USERNAME>, "Password": <BMC_PASSWORD>}' https://<BMC_IP>/redfish/v1/SessionService/Sessions/ |grep 'X-Auth-Token'

-> X-Auth-Token: 0e3814de06597a9568dd5692f9fc58fa

Now use this to subscribe:

curl -X POST -i --insecure --header "X-Auth-Token: 0e3814de06597a9568dd5692f9fc58fa" -H 'Content-Type: application/json' --data-raw '{"Protocol": "Redfish", "Context": "Public", "Destination": "https://hw-event-proxy-openshift-hw-events.apps.example.com/webhook", "EventTypes": ["Alert"]}' https://<BMC_IP>/redfish/v1/EventService/Subscriptions

-> you should get response 201 (Created) response and a Header with Location: https://<BMC_IP>/redfish/v1/EventService/Subscriptions/35