def METHOD_NAME(self, **kwargs):
    token_name = request.get_json().get('token_name')
    if not token_name:
        abort(400)
    scopes = current_oauth2server.scope_choices()
    token = Token.create_personal(
        token_name, current_user.get_id(), scopes=[s[0] for s in scopes]
    )
    db.session.commit()
    return token_to_json_serializer(token, show_access_token=True, code=201)