Hi,
Any pointer/example to call a REST API (with bearer token) using python or BASH from the process step.
Tried Python
import requests
endpoint = “https://www.workato.com/api/users/me”
headers = {“Authorization”: “Bearer token”}
print(requests.post(endpoint, headers=headers).json())
Error: "ModuleNotFoundError: No module named ‘requests’ "
Tried BASH
curl https://www.workato.com/api/users/me
-H “Authorization: Bearer token”
Error:
/home/Octopus/Work/ServerTasks-561-193d607c-4333-40b2-9720-88abcc2e625b/Script.sh: line 2: -H: command not found
November 7th 2023 09:10:06Info
{“message”:“Unauthorized”}
November 7th 2023 09:10:06Fatal
The remote script failed with exit code 127
November 7th 2023 09:10:06Fatal
The action Run a Script1 on a Worker failed
TIA
Charul