Title: "Complete Guide to AnyDesk REST-API: Features, Setup, Credentials, and Python Module"
REST-API
Table of Contents
Features | Setup | Credentials | Python Module |
---|
The AnyDesk REST-API is an interface designed to automate the retrieval and storage of database information from your my.anydesk.com account and is currently available for Premium license users (Professional, Power, Performance, Enterprise, Standard, Advanced, Ultimate, or On-Premises).
A typical use case for the REST-API service is to seamlessly integrate information from my.anydesk.com into 3rd party applications, such as automated billing tools, or to collect session data.
Features
As of version 1.1.1, the REST-API supports the following commands:
- Display the license information
- Show account information (license, number of clients, etc.)
- Show the list of AnyDesk clients registered to the account
- Display client details (such as online status, alias, etc.)
- Remove a client from your license
- Show a session list within a given time frame
- Show details of a particular session
- Change session comment
- Close an active session
- Change an alias
- Remove an alias
- List name and ID of every Address Book in your license
Setup
You can find the latest REST-API documentation in the Files tab of the my.anydesk.com customer portal.
This documentation contains the setup process (domain, authentication header) to connect the REST-Interface to the AnyDesk Servers.
Credentials
In order to access the REST-Interface for your account, you will need:
- License-ID
- API-Password
Note: For the REST-API credentials, please contact us and provide your customer number. If using an On-Premises license, please refer to the Installation Guide under “Console Commands” > “Advanced Commands” > “REST-API”.
Python Module
AnyDesk also provides an open-source Python module and example scripts to access the REST-API. You can use it as a reference for implementing your own programs or to quickly create scripts to automate tasks.
The example scripts include:
- Output of session data of every connection made within your license (e.g. license name, max sessions, namespaces, etc.)
Either as text response in the terminal or file export to .csv - Listing of all address book names and their IDs.
- Listing of all IDs that have been added to your license including the alias, if applied.
- System information like active sessions, total session count, client count, online clients and more.
The AnyDesk Python REST-API is open-source. Please feel free to write scripts yourself to help optimize your workflow.
To use the Python module, simply download the files contained in our GitHub and extract the files to your preferred location. Then, enter the REST-API credentials in the “auth.cfg” located in “…/doc/examples/”.
To run scripts in our Python module, please download and install the latest Python for your operating system.
- Published at