You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# No need to call auth.sign_out() as the Auth context manager will handle that on exiting the with block
33
+
```
34
+
21
35
<divclass="alert alert-info">
22
36
<b>Note:</b> When you sign in, the TSC library manages the authenticated session for you, however it is still
23
37
limited by the maximum session length (of four hours) on Tableau Server.
24
38
</div>
25
39
26
-
27
-
Alternatively, for short programs, consider using a `with` block:
40
+
### Disabling certificate verification and warnings
41
+
Certain environments may throw errors related to SSL configuration, such as self-signed certificates or expired certificates. These errors can be avoided by disabling certificate verification with```add_http_options```:
However, each subsequent REST API call will print an ```InsecureRequestWarning```:
52
+
```
53
+
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/security.html
54
+
InsecureRequestWarning)
55
+
```
56
+
57
+
These warnings can be disabled by adding the following lines to your script:
58
+
```py
59
+
import requests
60
+
from requests.packages.urllib3.exceptions import InsecureRequestWarning
The TSC library signs you out of Tableau Server when you exit out of the `with` block.
64
+
### A better way to avoid certificate warnings
65
+
Instead of disabling warnings and certificate verification to workaround issues with untrusted certificates, the best practice is to use a certificate signed by a Certificate Authority.
66
+
67
+
If you have the ability to do so, we recommend the following Certificate Authorities:
68
+
*[GlobalSign](https://www.globalsign.com/en/)
69
+
*[Let's Encrypt](https://letsencrypt.org/) - a free, automated, and open Certificate Authority
0 commit comments