Page History
In this section
Children Display |
---|
...
id | 1044102087 |
---|
...
id | 1044102090 |
---|
Content block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
When using cURL, the user’s credential (user name/password or a token) can be provided at the command line argument. A new session is created during the authentication. It is very important to note that a TWC session remains open after a REST API returns. This implies that a TWC session is not closed automatically. If the user’s credential is still in use (without sending a valid cookie), the license count will be used up, and new sessions cannot be created. The user needs to wait until the session is timed out. The default timeout is 15 minutes. The correct way to use REST API is to log in only once, reuse the session for all subsequent calls, and log out when finished. The following example is a Bash script used for creating a comma separated list of email addresses for all users in TWC, to facilitate sending notifications
The first execution of cURL logs in to the server. The server returns a session ID in a cookie. The cookie is saved into the cookie.txt file. The remaining cURL calls send the cookie back to the server to reuse the open session. The example below shows how to use PowerShell to create inernal users from a CSV file.
|
...
id | 1044102086 |
---|
Related pages
...