Closed ai-suzuki closed 3 years ago
hello by parts
this isn't realy api, is even depricated, the last supported api was /api/
so using api.py might give you unexpected behavior
(venv-cape) root@cape:/opt/CAPEv2/utils# ./api.py --host 0.0.0.0 --port 1337
CommandError: Cannot create the Token: user cape does not exist
it looks like you need to create user first, as both of your errors are about the same
django.core.management.base.CommandError: Cannot create the Token: user cape does not exist
can you show me that user exist and it still happens?
FYI you only need token if you have enabled auth, without auth you don't need any token
Thank you This os user is exists. Is the user here a user for the Cape app? If so, do you set it with [web_auth] in web.conf? Now,It is set not to use authentication.
no you need to become more familiar with difference of server side users and webapps users, that are 2 totally different topics
if you don't use auth you don't need token, and if you enable auth, restart web service and go to /admin/ and create users https://github.com/kevoreilly/CAPEv2/commit/0ac23cafc3b3524d598bcddd42aab89773bdf15f
Thank you! I was able to use the api with not using auth
Cool, if you need auth, just create user in django admin /admin/ and gen token for that user
El vie., 14 may. 2021 11:20, ai-suzuki @.***> escribió:
Thank you! I was able to use the api with not using auth
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kevoreilly/CAPEv2/issues/495#issuecomment-841124741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOFH36AJQJMOD42HLSL4JLTNTTONANCNFSM443RLKMQ .
This is open source and friendly with free support!
Prerequisites
Thank you for always answering the question! Thanks to you, I enjoy using cape!
Please answer the following questions yourself before submitting your question.
Expected behavior
I want to use api.(Any version)
Current behavior
I changed from REST API to REST API2. but when I run python3 manage.py drf_create_token,I get the following error
I really want to use api, so I get an error even if I switch back to the REST API ...(It's natural because the support is over)
Failure information (in case of bug)
Procedure to reproduce
Environment
Host machine: ubuntu 20.04.1 LTS installed Python 3.8.5 git pull, pip3 install -r requirements.txt OK
Failure log
reference Expected behavior