I am trying to get the REST API authentication to work via curl from the command line. I am following the docs, but I always get "incorrect secret error". I am posting the secrets here as this is just a test system.

I get the endpoint id with the following command:

curl -k --request GET https://test.local/api/v1/endpoints/...060242ac120002
{"id": "cd326566f7ca11e886060242ac120002", "name": "Test API Endpoint", "desc": "Test API Endpoint", "software_type": "Manual", "typ": null, "is_trusted": true, "is_enabled": true, "owner": {"id": "4ced6867c141e315e0f79090e9055424", "repo_id": "4535b5d4d69e11e886060242ac120002", "obj_id": "dd453ccd8fef9f4abd7dd626f21ddfa6", "repo_name": "xxx", "loginame": "xxx", "user_name": "xxx\xxxx", "last_fail_at": null}, "is_local": false, "device_id": ""}

I then try to get the sessions
curl -k --header "Content-Type: application/json" --request POST --data '{"salt": "test_salt","endpoint_secret_hash": "F04BCFD8AE5022C9D60ADEEAEEBF2439ED24D978CFBF85829 624E223D480F2C5"}' https://test.local/api/v1/endpoints/...20002/sessions
{"status": "error", "errors": [{"location": "server", "name": "AuError", "msgid": "AUCORE-1065", "description": "Incorrect credentials (endpoint secret)"}]}

The endpoint secret is: 50b9q5UkXBi2WSbj1I4BSTjYw609wrKE

I am using this website http://www.convertstring.com/Hash/SHA256 to do the SHA256 hashes for me.

Can anyone assist ?