其中:user_id 是登录用户的 userid。
success = management_client.users.kick([user_id])
返回错误如下。请问这个参数怎么传递才是对的:
KeyError
KeyError: ‘data’
Traceback (most recent call last)
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py”, line 2464, in
__call__
return self.wsgi_app(environ, start_response)
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py”, line 2450, in
wsgi_app
response = self.handle_exception(e)
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py”, line 1867, in
handle_exception
reraise(exc_type, exc_value, tb)
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask_compat.py”, line 39, in
reraise
raise value
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py”, line 2447, in
wsgi_app
response = self.full_dispatch_request()
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py”, line 1952, in
full_dispatch_request
rv = self.handle_user_exception(e)
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py”, line 1821, in
handle_user_exception
reraise(exc_type, exc_value, tb)
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask_compat.py”, line 39, in
reraise
raise value
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py”, line 1950, in
full_dispatch_request
rv = self.dispatch_request()
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py”, line 1936, in
dispatch_request
return self.view_functionsrule.endpoint
return processusersession(request, 1)
success = management_client.users.kick([user_id])
-
File “C:\Users\hao\AppData\Local\Programs\Python\Python38\Lib\site-packages\authing\v2\management\users.py”, line 730, in
kick
return self.restClient.request(
KeyError: ‘data’