You'll want to generate your ticket by using the proxyhostname/trusted endpoint. If you are getting an error doing this, it likely means you need to follow the instructions here to have Tableau Server trust requests coming in from the proxy server:
In our case, we are making call to https tableau server to get trusted ticket. I have noticed that tableau was responding 302/301 with response header location having http.
This is what I did :
1. tabadmin stop
2. update httpd.conf.templ located at server\templates\httpd.conf.templ to have following entry at the end. It checks if response header has Location that is starting with http then change it to https.
3. Updated httpd.conf in ProgramData to have same at the end.
4. tabadmin start