[GH-ISSUE #1903] A way to run shell commands in pre-request script #607

Closed
opened 2026-03-16 16:21:16 +03:00 by kerem · 1 comment
Owner

Originally created by @rmchale on GitHub (Oct 25, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1903

I am building services in cloud-run that require tokens to invoke. The recommended way to fetch a token is via a cli command. https://cloud.google.com/sdk/gcloud/reference/auth/application-default/print-access-token

gcloud auth application-default print-access-token
curl -H "X-Goog-User-Project: your-project" -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" foo.googleapis.com

How would I accomplish this in hoppscotch? It doesn't appear I can kick off a sub-process in the pre-request script.

Originally created by @rmchale on GitHub (Oct 25, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1903 I am building services in cloud-run that require tokens to invoke. The recommended way to fetch a token is via a cli command. https://cloud.google.com/sdk/gcloud/reference/auth/application-default/print-access-token ``` gcloud auth application-default print-access-token ``` ``` curl -H "X-Goog-User-Project: your-project" -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" foo.googleapis.com ``` How would I accomplish this in hoppscotch? It doesn't appear I can kick off a sub-process in the pre-request script.
kerem closed this issue 2026-03-16 16:21:22 +03:00
Author
Owner

@liyasthomas commented on GitHub (Oct 26, 2021):

Hi @rmchale, as of now there's only support for JavaScript in the pre-request script - no support to shell commands.

<!-- gh-comment-id:951507531 --> @liyasthomas commented on GitHub (Oct 26, 2021): Hi @rmchale, as of now there's only support for JavaScript in the pre-request script - no support to shell commands.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#607
No description provided.