Access Token Authentication

As of the Netsweeper 8.2 and above releases, all APIs can now authenticate using an Access Token. This can be done using a Cookie. After logging in, you can call the specific, desired API.

Example

curl -b cookie.jar -c cookie.jar https://servername/webadmin/api/token.php?token=VALUE

curl -b cookie.jar -c cookie.jar https://servername/webadmin/api/account_list.php

Example Output

[root@localhost ~]# curl -b cookie.jar -c cookie.jar localhost/webadmin/api/token.php?token=VALUE

OK:

[root@localhost ~]# curl -b cookie.jar -c cookie.jar localhost/webadmin/api/account_list.php

OK:

login=>admin

login=>jacob.newly@schoola.org

login=>jean.rambaux@schoola.org

login=>mark.callaway@schoola.org

login=>richard.bachman@schoola.org

login=>sally.ryan@schoola.org

login=>samuel.clemens@schoola.org

login=>saul.hudson@schoola.org

Alternatively, the new 'NswAuthentication' header can be used, but requires sending the token with every Direct or SOAP API request.

Example

curl -H "NswAuthentication: VALUE" -k "https://servername/webadmin/api/account_list.php"

Additional information on Access Tokens can be found in our My Account Preferences documentation.