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.\

0

There are 0 best solutions below