Authentication with a golang plugin

Hi @redochenzhen ,

Welcome to Tyk Community and thank you for your patience on this.

Upon checking it seems that the issue { “error”: “Access to this API has been disallowed” } happens because there’s an issue with the plugin that’s why it is not being loaded properly. I can see that there’s indeed dependency issue happening on 3.2.1. Also as mentioned in this thread , it seems that there’s a bug in v3.2.x where the session is not being retrieved and since the code that you are following uses sessions, it will also have some issues. You can use v3.1.2 and the code works properly. Please let us know if there’s also a reason if you really need to use v3.2.x.

Additionally, I notice in your API Definition that there’s this line "driver": "otto", which should not be included. The correct “driver” field should be only the one inside the custom_middleware.