# I am facing issue to generate the access token

**URL:** <https://discuss.konghq.com/t/i-am-facing-issue-to-generate-the-access-token/11766>\
**Category:** Questions\
**Tags:** plugins\
**Created:** [August 9, 2023, 8:32am UTC](https://discuss.konghq.com/t/i-am-facing-issue-to-generate-the-access-token/11766 "2023-08-09T08:32:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthcik](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@karthcik](https://discuss.konghq.com/u/karthcik)\
**Post date:** [August 9, 2023, 8:32am UTC](https://discuss.konghq.com/t/i-am-facing-issue-to-generate-the-access-token/11766/1 "2023-08-09T08:32:28Z")

</div>

i have an service named as test-service under the service i am created the route named as test-endcustomer. while creating the service i am giving the host as [https://personal-91siwo3k.outsystemscloud.com/](https://personal-91siwo3k.outsystemscloud.com/) this one and path is

```auto
APEXADIOrdering_API/rest/ADIOrdering/EndCustomersList

```

this one after that i am creating the route the host as [ordering.com](http://ordering.com) and path as /endcustomerslist. after that i am enables the oauth2 plugin in kong manager GUI there i am able to get the provision key. and then i am created the consumer named as karthick and make the credentials under the consumer tab there i am getting client id, client secret, also there asking for redirect uri i am giving the route endpoint that is which api i need to access that api endpoint. after that i am trying to generate the access token with help of client credentials i am using the ubuntu terminal that endpoint is.

curl -X POST "[https://localhost:8443/test-service/oauth2/token"?](https://localhost:8443/test-service/oauth2/token%22?) -d “grant\_type=client\_credentials” -d “c  
lient\_id=PbgKKXnP1kqMiJwrXn8erCYwiJmt9DMg2” -d “client\_secret=LRTI2CRTjpnppLBLYp3FoZVITLIoRs9b” --insecure

now i am not able to get the access token even though i have service routes but it will throw the error as.

{  
“message”:“no Route matched with those values”  
}

now to resolve this. i have configured kong properly my local host 8001, and manger port 8002 is working fine eventhough i am using the ubuntu terminal to get the response of some other api without oauth also i am able to get the response.
