Hello, we are trying to get user data through the application access level "Company" with maximum rights, but api returns data without mailboxes. In the documentation for api there is a mention of the "ReadEmail" access right, but nowhere in the interface are we found them. Mail is needed to match users of our portal and users of TeamViewer. How can we get the mail data of all users or where in the rights settings, you can add the right to read user mailboxes.
You could better expose the usage scenarios you anticipate.
Do you have created a script or an application key? The users you want to retrieve are included in your TeamViewer company? (i hope so)
Could you indicate the sequence of calls to TeamViewer APIs; you do not need to indicate authentication tokens, but only the parameters used in query queues (GETs) or in the request body (PUT, POST) and obviously api method address.
$http = new HttpClient(); /*Authorize*/ $postData = array( 'grant_type' => 'authorization_code', 'code' => $_GET["code"], 'redirect_uri' => 'www.example.com', 'client_id' => $clientId, 'client_secret' => $clientSecret ); $response = $http->query('POST', 'https://webapi.teamviewer.com/api/v1/oauth2/token/', $postData); /*Get Users*/ $http->setHeader('Authorization', 'Bearer '.$_GET['token']); $response = $http->query('GET', 'https://webapi.teamviewer.com/api/v1/users?full_list=true');
You mentioned the code, but you did not answer some of the previous questions. In practice you have not indicated the general view of what you want to get.
You should specify the scenario:
- do you want to query via API a set of data in your TeamViewer domain, with a Script Token?
- do you want to query via API a set of TeamViewer users data, also if not present in your TeamViewer domain, with OAuth authentication mode - public App (this scenario involves user's browser, TeamViewer web authentication system, and your web application)
The two scenarios are completely different.
Let me know.
GET to /api/v1/users -> The answer does not provide this information.
You can get the data you requested by calling the GET method for the specific user, at least this is indicated in the example, although it is not actually reported as a return value. To be verified.
GET to /api/v1/users/<uxxxxxx>
In your case, therefore, should iterate for each user returned from the first GET to /api/v1/users?full_list=true
This query (GET https://webapi.teamviewer.com/api/v1/users/u********) returns a data set without the email field
Did you solve this issue