Ticket creation from chatbot issue

I tried to create a ticket in the rt server from my chatbot using the following python code. But the ticket is not created in the rt server.

Department = “SMG”
email = “akhil.siby@reflectionsinfos.com
subject = “test ticket”
url = “http://rt.reflectionsinfo.com//REST/1.0/ticket/new?user=myusername&pass=password
payload = “content=Queue%3A%20” + Department + “%0ARequestor%3A%20” + email + “%0ASubject%3A%20” + subject + “%0AStatus%3A%20new%0AText%3A%20” + subject
headers = {
‘Content-Type’: ‘application/x-www-form-urlencoded’,
‘Cookie’: ‘RT_SID_rt.reflectionsinfo.com.80=d7d121595bb59f7a9d39bd0a2226e265’
}
response = requests.request(“POST”, url, headers=headers, data=payload, verify=False)
print(response.txt)

this is my code . The ticket is not creating in the RT server. And the response.txt is getting as follows

id: ticket/new
Queue:
Requestor: akhilsiby
Subject:
Cc:
AdminCc:
Owner:
Status: new
Priority:
InitialPriority:
FinalPriority:
TimeEstimated: 0
Starts: 2021-07-29 10:44:27
Due:
SLA:
Attachment:
Text:
can someone please help me to solve this problem

Assuming a queue named “SMG” exists in RT, it seems that should be fine

Thank you for the response. This issue is solved. Now ticket is getting created using the bot. The ticket id is showing.
But still, I can’t view the ticket on my RT server. When I search for the ticket using id the following error is showing
“No permission to view ticket”

Can you please help me to solve this?

If you are using RT5.x have you tried the Rights Inspector?