OAUTH 2 - Not bale to get the token for client credentials

OAUTH 2 - Not able to get the token for client credentials

created the service, routes,enabled the OAUTH plugin, created the consumer, provided the OAUTH provision
and when getting the tokens it is throughing as Error: SSL connect error
{
“grant_type”:“client_credentials”,
“client_id”:“mymerchantanduserservice”,
“client_secret”:“2374efc6-57db-4f64-8218-cb97b1abf390”,
“scope”:“merchants”

}
URL : https://*****:8000/v1/api/oauth2/token

iam using insomnia for testing
image

Can any one help me on this?

Most likely you are using a self-sign certificate. You need to disable ssl checks on insomnia if that’s the case.

If it still doesn’t work, try cURL

curl -X POST \
  --url " https://*****:8000/v1/api/oauth2/token" \
  --data "grant_type=client_credentials" \
  --data "scope=email address" \
  --data "client_id=mymerchantanduserservice" \
  --data "client_secret=2374efc6-57db-4f64-8218-cb97b1abf390" \
  --data "provision_key=xxx" \
  --insecure

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ