Global plugin oauth2 can not visit /oauth2/token

kong version: 0.14.1

I have installed global plugin oauth2, and added the consumer. And then associate them as:

            "created_at": 1538186866000,
            "client_id": "client-123456",
            "id": "06af0f5e-baa3-4d2e-af3d-39d158181976",
            "redirect_uri": [
            "name": "partner",
            "client_secret": "secret-123456",
            "consumer_id": "5b6aaca9-3f46-4e29-93dd-682c004e692b"

But when I visit the endpoint https://localhost:8443/oauth2/token (using POST) , network respond 404, The message like:

    "message": "no route and no API found with those values"

I have tried all ports (8000, 8001, 8443, 8444), but nothing changed.

How can i do? Any body help me?

Ive never enabled the Oauth2 plugin globally. But what I have done that works is make a localhost Service + Route Pair and name your route path like /auth , then add oauth2 plugin to the route you declared and call it on the /auth/oauth2/token endpoint(make sure you create oauth2 ontop of the route with client credentials checked and global checked). As for globally if its not working on root of gateway/oauth2/token(which I think should work if they baked in extra logic, but does not because no API resource or service+route pair exists for the call path to be registered). Not sure Kong ever intended it to be enabled globally and to have that sort of “default global path” on the gateway itself though. But do give my method a try and see if it works for you.