Environment variable not substituted in "Client Id" Auth field for JWT Token Refresh

When using an environment variable in the “Client Id” field of the form to retrieve a JWT authentication token via the refresh token, the variable name is sent instead of its value. Note that the classic JWT retrieval works correctly, and the client ID is sent properly.

Steps to Reproduce:

  • Open Apidog and go to the Auth form.
  • Enter an environment variable (e.g., {{CLIENT_ID}}) in the “Client Id” field.
  • Initiate the token retrieval process using the refresh token.
  • Observe the request sent to the server.

Expected Result: The value of the environment variable {{CLIENT_ID}} should be substituted and sent in the “Client Id” field.

Actual Result: The name of the environment variable {{CLIENT_ID}} is sent instead of its value.

Additional Information: The following log entry from Keycloak confirms the issue, showing that the environment variable name was sent instead of the actual client ID:

WARN  [org.keycloak.events] (executor-thread-40) type="REFRESH_TOKEN_ERROR", realmId="***********", realmName="master", clientId="{{CLIENT_ID}}", userId="null", ipAddress="***.***.***.***", error="client_not_found", grant_type="refresh_token"

Environment:

Thanks for the feedback, we’ll see if we can reproduce this issue.

I came here to report this exact issue so I’m sure the team should be able to reproduce as well. It’s also not just the ClientID field but also the Refresh Token URL field in Advanced. If that field’s toggle is enabled to “The same as Access Token URL” or if it’s not and an environment variable is used, both of those scenarios will fail. Only way to work is to use the explicit value.

Hope this gets resolved soon.

Hello,Alan.Thank you so much for your feedback and patience. We really appreciate it. So far, even though our team has been working hard on this, we haven’t been able to recreate the problem you’ve described. To help us figure out exactly what’s going on, we need some more information. Here’s what would be really helpful:

Interface screenshots: If you can, please send us some screenshots of your setup and what happens when you run into the problem. These will really help us understand what’s going wrong.

System and version information: Please let us know which operating system you’re using, what version of your browser you have, and the version of any authentication services or tools you’re using.

We understand it’s frustrating that we haven’t been able to reproduce the issue yet, but we want to assure you that we’re taking this seriously and will keep working on it until it’s fixed.

Thanks again for your help and patience with this. If you have any questions or need anything else, please don’t hesitate to contact us.


Hi Emily,

Ok here’s a bunch of into that I hope helps but if you need anything more just let me know.

Apidog Version 2.6.31 (2.6.31)
macOS 15.3 Beta (24D5034f)

Thanks!




Alan,Thank you so much for your continued feedback and patience. We’ve been able to reproduce the problem you reported and have confirmed it’s a bug that needs fixing.
Rest assured, we will let you know through the appropriate channels once it’s done.
Thanks again for your understanding and support. If you have any other questions or need further assistance, please don’t hesitate to contact us.

Alan Williams Hi Alan, apologies for the delayed response. I’m pleased to inform you that we have already resolved this issue. Please update to the latest version to use it. Your patience and support are greatly valued. Thank you!


hey Emily thanks a lot for the update. I just tested and can confirm it works. Yay!!! Thanks to you and the team!