Environment variable in public documentation

Hello,
I’m using Apidog to document my API and I’ve encountered an issue with the published documentation.
In the Apidog application, I created an environment variable called accessToken and added post-processing scripts on my /login and /register endpoints to automatically store the token after a successful response. I then configured other protected routes to use this variable for authentication, and everything works perfectly.
However, in the published documentation, the accessToken variable remains empty. The post-processing scripts don’t execute, so the token is never stored automatically and users have to manually copy and paste it for each protected endpoint.
Is it possible to enable post-processing scripts in the published documentation so that users can test protected endpoints without this manual step? If this isn’t possible due to security limitations, what would be the recommended approach to provide a smooth testing experience for documentation users?
Thank you for your help.

Hello Mialto,

For your published documentation, you can use variable sharing to solve the token issue:

  1. Use {{ACCESS_TOKEN}} in API Headers
  2. Or set Bearer {{ACCESS_TOKEN}} as a global parameter
  3. Users only need to input the token once at the top of the documentation, and it will be automatically used for all protected endpoints

You can refer to our documentation for detailed steps: [Apidog Documentation Link]

Hello Mialto,

For your published documentation, you can use variable sharing to solve the token issue:

  1. Reference {{ACCESS_TOKEN}} in API headers (e.g., Authorization: Bearer {{ACCESS_TOKEN}})
  2. Or configure it as a global parameter with Bearer {{ACCESS_TOKEN}}
  3. Users only need to enter the ACCESS_TOKEN value once at the top. All APIs that reference {{ACCESS_TOKEN}} will automatically fill in the value—no need to enter it repeatedly.

You can refer to our documentation for detailed steps: How to Share Headers (e.g., Token) in Apidog Online Docs? - Apidog Docs

Thank you !