HI, I am trying to create api but my target api is basic auth protected so how I can create an api definition so that tyk will pass auth parameters (id and password) to the target url which is passed to the tyk .
So suggest for the complete configuration. I tried to refer old link but quite confused.
The malformed error is because the value for the auth header contains the template in the snippet I shared “Authorization”: “Basic { id : password }”. You simply need to replace the it with a base64 hash value of your { ID } : { PASSWORD }.
However, if you are not worried about exposing upstream auth data to the client, then you can simply remove the global_headers from the API definition and pass in your authentication data in the header from the client. You would need to ensure “strip_auth_data” is set to false in your API definition. This way Tyk would forward your authentication data upstream.
In simple words, you need to call your Tyk endpoint the same way you would your backend.