I have changed the configuration, in order to try.
My user is id=7, and the group he belongs to is id=3:
% curl --header "Content-Type: application/json" \
--header "Authorization: Token token=xyz" \
--request GET \
http://localhost:8080/api/v1/groups/3
{"id":3,"signature_id":null,"email_address_id":null,"name":"ATENEO","name_last":"ATENEO","parent_id":null,"assignment_timeout":null,"follow_up_possible":"yes","reopen_time_in_days":null,"follow_up_assignment":true,"active":true,"shared_drafts":true,"note":"Gruppo di ateneo\u003cbr\u003e","updated_by_id":3,"created_by_id":3,"created_at":"2024-06-06T13:22:23.714Z","updated_at":"2024-06-06T14:50:11.870Z","user_ids":[7]}
% curl --header "Content-Type: application/json" \
--header "Authorization: Token token=xyz" \
--request GET \
http://localhost:8080/api/v1/users/7
{"id":7,"organization_id":null,"login":"perl@perl.me","firstname":"Applicazione","lastname":"","email":"perl@perl.me","image":null,"image_source":null,"web":"","phone":"","fax":"","mobile":"","department":"","street":"","zip":"","city":"","country":"","address":"","vip":false,"verified":false,"active":true,"note":"","last_login":null,"source":null,"login_failed":0,"out_of_office":false,"out_of_office_start_at":null,"out_of_office_end_at":null,"out_of_office_replacement_id":null,"preferences":{"notification_config":{"matrix":{"create":{"criteria":{"owned_by_me":true,"owned_by_nobody":true,"subscribed":true,"no":false},"channel":{"email":true,"online":true}},"update":{"criteria":{"owned_by_me":true,"owned_by_nobody":true,"subscribed":true,"no":false},"channel":{"email":true,"online":true}},"reminder_reached":{"criteria":{"owned_by_me":true,"owned_by_nobody":false,"subscribed":false,"no":false},"channel":{"email":true,"online":true}},"escalation":{"criteria":{"owned_by_me":true,"owned_by_nobody":false,"subscribed":false,"no":false},"channel":{"email":true,"online":true}}}},"locale":"en-us","tickets_closed":0,"tickets_open":71},"updated_by_id":3,"created_by_id":3,"created_at":"2024-03-18T15:32:43.465Z","updated_at":"2024-06-06T14:49:16.239Z","role_ids":[4],"two_factor_preference_ids":[],"organization_ids":[],"authorization_ids":[],"overview_sorting_ids":[],"group_ids":{"3":["full"]}
Note that the user has full
control over group 3
.
However:
% curl --header "Content-Type: application/json" \
--header "Authorization: Token token=xyz" \
--request POST \
--data '{"article":{"body":"CIAO CIAO","internal":0,"subject":"PRIMO TEST categoria","type":"note"}, "group_id":3, "customer":"perl@perl.me","title":"PRIMO TEST categoria"}' http://localhost:8080/api/v1/tickets
{"error":"Not authorized","error_human":"Not authorized"}
Is there a way to get a better error message?
What should I look for?