Can I Access the `$auth` of an App in a Different Step?

This topic was automatically generated from Slack. You can find the original thread here.

Can I access the $auth of an app in a different step? I want to use a prebuilt action to download to tmp but I need to reference the API key from a specific app.

I guess I can just do download to tmp inside a code step and import the app prop.
I can also import the app prop in it’s own step and have the step just return the API key.

Wondering if there’s a way to reference directly.

You can just add the app as a prop, then access the this.appName.$auth directly.

Does that help?

Basically I want to use the prebuilt Download File To /tmp action; I need to include the API Key from an app in the URL.

I can’t include this.$auth.api_key in the prebuilt action, because there’s no app attached with the action.

Got it, now I’m following

I wish you could convert a pre-built action into a code step from the menu, that would help with this

Exactly!!

You could export the API key from a Node.js step prior, or put the API key in an ENV var

I did the ENV for now…

I guess I’ll just make it a custom component since I want to add some other things to it as well.

Yup that’s what I would do too

Alright, only took me 15 minutes :sweat_smile: