Custom Module Dynamic API Key

Hey guys,

I’m creating a custom module and for connection; I need to use a bearer token on my API connection but I need to get this bearer token from an API endpoint after I sign the JWT every 30 minutes.

I want to create the connection dynamically for the module that I’m going to use and I want to get the token of this connection dynamically from the previous module on the workflow.

Is it possible to do that?

In other words:

I want to create a custom module for an endpoint but this endpoint has a bearer token in the header which I need to get dynamically every 30 minutes. So I cannot define one connection and go with that. I need to update my connection’s API key every 30 minutes. Is it possible to make that on custom modules?

The Custom Apps documentation only mentions a refresh token for OAuth connections.

For API key connections, I don’t think it’s possible, not even via the Make API using the Update connection endpoint, which does not have a connection string/token field.

You can try asking your Make Partner liaison, or contacting support for more information.

3 Likes

Hi @onurbolaca What you are suggesting doesn’t sound like an APIkey connection to me, but rather closer to OAuth.

Even if it is an APIkey connection, you can actually “abuse” the OAuth connection type to create more complex auth flows, including automatically generating a new token every 30mins.

You wouldn’t need a separate module either, the whole logic for keeping the connection alive by refreshing the token “lives” in the Connection part of the custom app. You can refer to this page for more info: https://docs.make.com/apps/app-structure/connections/oauth2

I’d like to understand what you’re trying to do better though if that doesn’t seem right to you. Could you share this API documentation with us?

4 Likes