def METHOD_NAME(self, request, token_handler):
    """Return token or error in JSON format.
    :param request: OAuthlib request.
    :type request: oauthlib.common.Request
    :param token_handler: A token handler instance, for example of type
                          oauthlib.oauth2.BearerToken.
    If the access token request is valid and authorized, the
    authorization server issues an access token as described in
    `Section 5.1`_.  A refresh token SHOULD NOT be included.  If the request
    failed client authentication or is invalid, the authorization server
    returns an error response as described in `Section 5.2`_.
    .. _`Section 5.1`: https://tools.ietf.org/html/rfc6749#section-5.1
    .. _`Section 5.2`: https://tools.ietf.org/html/rfc6749#section-5.2
    """
    headers = self._get_default_headers()
    try:
        log.debug('Validating access token request, %r.', request)
        self.validate_token_request(request)
    except errors.OAuth2Error as e:
        log.debug('Client error in token request. %s.', e)
        headers.update(e.headers)
        return headers, e.json, e.status_code
    token = token_handler.create_token(request, refresh_token=False)
    for modifier in self._token_modifiers:
        token = modifier(token)
    self.request_validator.save_token(token, request)
    log.debug('Issuing token to client id %r (%r), %r.',
              request.client_id, request.client, token)
    return headers, json.dumps(token), 200