Gateway API for generating Auth code in CE gateway

We are trying to implement authorization code grant type in Tyk Gateway. We have created a Oauth client through Gateway API.

When we try to call the Gateway API (/tyk/oauth/authorize-client/) to generate the auth code it is returning 404 error.

Do we need to call Gateway API for auth code or the actual API Definition which we have created with security policy? For token generation we are calling actual API Definition and its working fine.

Hey @Anup_Rai thanks for your question.
You can find more information on the tyk Oauth flows here: OAuth 2.0
There is also a video here: OAuth 2.0 that steps through the configuration of the Oauth 2.0 settings.

Under normal operation you would use the API endpoint url with /oauth/authorize-client/ appended. the gateway specific endpoint is for use cases where there may be restricted access to the dashboard API.

Thanks, Gregor

Thanks @Gregor for the quick reply.

When I call API endpoint url with /oauth/authorize-client/ appended then call goes to upstream system.
For token generation it works fine, it generates the token and returns in response.

But for access code generation its not working as expected. We followed the documentation here.

when calling the management api the format is slightly different and you need to append /api/apis/oauth/authorize-client/

can you try that and let us know?

I tried below URLs -

ManagementAPI Host:Port/tyk/api/apis/oauth/authorize-client/
This gave 404 error

Management API Host:Port/api/apis/oauth/authorize-client/
This gave 404 error

API Listen path/api/apis/oauth/authorize-client/
For this call went to upstream API.