Check Token API Endpoint

What is the expected response for a failure to the endpoint /oauth/check_token?token=TOKEN? According to the docs here,
Blizzard Battle.net Developer Portal, on a success it will return metadata including the client id used to create the token expiration timestamp and scopes. I’ve tested this with a valid token and I receive the expected response for a valid token.

What the docs do not mention, is what the response will be for a token that has already expired. When I test it with an invalid token I get a 400 error with invalid token. Is this 400 error the expected response for an invalid token? I suspect this could also come from an improper token as well (e.g. totally made up).

Is there no predefined invalid token response, similar to a success?

I think you can look at the HTTP status code.

2xx - Token is valid
4xx - Token is invalid (like it is now; 400 -Bad request)
5xx - Not determined, the server had a stroke.

I found in practice if you send an invalid token, you get back nothing - a blank response.

I didn’t get a 400 oddly.

Threw me for a loop.

I’m testing enough I haven’t had an expired token yet :slight_smile: but I could try one I copied from last week and see what I get.

    == John ==

I was referring to the HTTP status of the response. Not the content.

M.