How to add basic auth. as header to API?


Some of APIs are using basic authentication so we need to find a way to authenticate Tyk with our API. Is it anyway to do that in tyk?


Tyk does support Basic Auth. Basically all the info you need is here :

In short, you’ll need to have this parameter in the json you use to define of your api “use_basic_auth”: true
then you can create a key with the parameter “basic_auth_data”: {“password”: “mypassword”}
The password for the Basic Auth will be (obviously) “mysuperpassword” and the login will be name you use to create the key when calling /tyk/keys/myLogin

Have a great day