Send Authentication key with Action Menu Items

Hello all - I’d like to use Action Menu Items to send a command to a REST api of an app I’m using. The app itself requires an authentication token, which I have, but I’m not sure how to include that in the header of the call from the Action Menu Item.

For example, a successful curl command for this api would look like:

curl -H "Authorization: MY-SECRET-KEY" --json '{"args": ["one", "two", "three"]}' https://MY-URL/post

Any suggestions on how to get this to work with Action Menu Items?


I see two main options:

  • key is kept in a secrets store (could be e.g. an encrypted file) on the AMI handler machine. When an AMI request is handled, program opens the secrets store, gets the key, and adds it in an auth header
  • key is added as a property of the AMI. The handler takes the key from the request, and sets it in the auth header.

Not sure if I understood your question right, though? Or do you want to achieve this without an intervening program?


Yeah, I’d like to get this to work by not having to use an intervening program. The use case is for a coordinator to run it from any machine they might be using - laptop, iPad, whatever.

I’d also like to not have to set up a web proxy just to authenticate - if shotgrid has the ability to take an api key and send that in the header of the request, that would be perfect.

I seriously doubt it, but someone more knowledgeable should chime in.

No I don’t think this is possible like that unless you can send the key in the URL which is less secure.

Otherwise you will need some service to bridge the communications.

Does your service on the other side understand ShotGrid’s data?
In that case, does a piece of code run to get data from the POST request?
Can you maybe base64 encode the secret in the request url and then retrieve it?