PMG API HELP 401 no ticket

miggy723

New Member
Nov 4, 2020
2
0
1
29
i understand i need to pass my access ticket with any future request. i get my ticket from the post request. and i am passing my ticket as so.
\\\\\\\\ curl_setopt($ch1, CURLOPT_HTTPHEADER, array("Cookie" => $ticket_code )); \\\\\\\
the language i am using is PHP and using curl to make the request. i've also tried passing it as a param. url.com/quarantine/spam?ticket..... and still nothing.
i am obviously missing something. i wish the docs provided more clear direction on how to use the ticket.
 
Thanks, i was able to figure it out with the help of another developer,
so a couple things actually helped solve my issue.

1. in the get url add a pmail parameter "?pmail=email@email.com"
docs do mention it is optional but doesnt seem to be the case
2.insert cookie headers as so "Cookie: PMGAuthCookie=ticket...."
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!