1

I have a service named test-service pointing to the host https://personal-91siwo3k.outsystemscloud.com/ with path config of APEXADIOrdering_API/rest/ADIOrdering/EndCustomersList

Afterward, I created a route pointing to said service named test-endcustomer with host ordering.com path /endcustomerslist

After that, I enabled OAuth2 plugin in Kong manager GUI. I am able to get the provision key.

Then, I created a consumer named karthick and create OAuth2.0 credentials under the consumer tab, from there got client_id, client_secret.
I also added a redirect_uri with the value of the endpoint that I want to use

With all the above configurations done, I made a HTTP request to Kong to request for an access token:

curl -X POST "https://localhost:8443/test-service/oauth2/token"?\
-d "grant_type=client_credentials" \
-d "client_id=PbgKKXnP1kqMiJwrXn8erCYwiJmt9DMg2" \
-d "client_secret=LRTI2CRTjpnppLBLYp3FoZVITLIoRs9b" \
--insecure

I can't get the access token with the error of:

{"message":"no Route matched with those values"}

I've configured Kong Admin API to localhost:8001 and Kong Manager to localhost:8002, both are working fine and I'm able made HTTP requests to Kong without OAuth2.0 configured.\

Ponsakorn30214
  • 267
  • 4
  • 11
karthick
  • 11
  • 1
  • Can you share the OAuth2.0 plugin configuration? where did you apply the plugin to? also, why are you requesting to `/test-service`? isn't the route you created has the path of `/endcustomerslist`? – Ponsakorn30214 Aug 09 '23 at 10:49
  • http://localhost:8001/service/test-service/routes/test-route/plugins name=oauth2 redirect uri=ordering.com/endcustomerslist – karthick Aug 10 '23 at 07:31
  • You have a space in the `client_id` parameter name. – Mark Baijens Aug 10 '23 at 07:44

0 Answers0