title: How to add Bearer token to headers of generated api endpoint from openapi-generator-cli
body: <p>I am testing the <a href="https://github.com/OpenAPITools/openapi-generator-cli" rel="nofollow noreferrer">openapi-generator-cli</a> to generate services for a <strong>React</strong> client app from a <strong>swagger.json</strong> file.</p>
  <p>Now some routes are protected and require a <strong>Bearer token</strong> in the headers. The token is returned after login.</p>
  <p>Is there a possibility to add them as a config or header parameter when calling the generated methods of protected routes?</p>