Sema4AI/actions

Unable to trigger actions with APIs via the exposed .link url

kariharju opened this issue · 0 comments

Issue by ekipalen
Thursday Apr 11, 2024 at 16:51 GMT
Originally opened as robocorp/robocorp#349


Target components

action_server

What is wrong

Triggering the actions via API using the exposed URL fails.

Reproduce the issue:

  1. Create a new action package using the template
  2. Start and expose the action
  3. Trigger the action via API using the localhost url - works
  4. Trigger the action via exposed .link url - doesn't work

Localhost URL, succeeds.

curl -X POST http://localhost:8080/api/actions/package-name/compare-time-zones/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 12345" \
-d '{"user_timezone":"Europe/Helsinki", "compare_to_timezones":"America/New_York,Asia/Kolkata"}'

Exposed URL, fails:

curl -X POST https://thirty-zero-hungry-yaks.robocorp.link/api/actions/package-name/compare-time-zones/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 12345" \
-d '{"user_timezone":"Europe/Helsinki", "compare_to_timezones":"America/New_York,Asia/Kolkata"}'

Error:
Invalid request: The received input arguments (sent in the body) cannot be interpreted as json. Details: Unterminated string starting at: line 1 column 62 (char 61) [/api/actions/package-name/compare-time-zones/run]

System info

  • AS 0.1.1 didn't have his issue
  • Versions 0.1.4 and never seems to be affected
  • Same behavior with Windows and Mac

Example script

No response