# sales_tim_api

SalesTimApi - JavaScript client for sales_tim_api The unified Microsoft Teams Governance API. Visit our Tech Hub (opens new window) for more information.

This SDK is automatically generated by the OpenAPI Generator (opens new window) project:

# Installation

# For Node.js (opens new window)

# npm

To publish the library as a npm (opens new window), please follow the procedure in "Publishing npm packages" (opens new window).

Then install it via:

npm install sales_tim_api --save

Finally, you need to build the module:

npm run build
# Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link (opens new window) it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your sales_tim_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

# git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

# For browser

The library also works in the browser environment via npm and browserify (opens new window). After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

# Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
      parser: {
        amd: false

# Getting Started

Please follow the installation instruction and execute the following JS code:

var SalesTimApi = require('sales_tim_api');

var defaultClient = SalesTimApi.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

var api = new SalesTimApi.ApprovalsApi()
var approvalRequestId = "approvalRequestId_example"; // {String} The approval request ID.
var opts = {
  'approvedApprovalResponsePayload': new SalesTimApi.ApprovedApprovalResponsePayload() // {ApprovedApprovalResponsePayload} An ApprovedApprovalResponsePayload object.
var callback = function(error, data, response) {
  if (error) {
  } else {
    console.log('API called successfully.');
api.approveTeamCreation(approvalRequestId, opts, callback);

# Documentation for API Endpoints

All URIs are relative to https://api.salestim.io/api/v1.0

Class Method HTTP request Description
SalesTimApi.ApprovalsApi approveTeamCreation POST /approvals/{approvalRequestId}/approve Approve a team creation request
SalesTimApi.ApprovalsApi rejectTeamCreation POST /approvals/{approvalRequestId}/reject Reject a team creation request
SalesTimApi.AuditTrailsApi getAuditTrailRecords GET /audittrails/{code}/records Get all the records from an audit trail
SalesTimApi.AuditTrailsApi getAuditTrails GET /audittrails Get audit trails
SalesTimApi.JobsApi getJob GET /jobs/{jobId} Get information about a job
SalesTimApi.SensitivityLabelsApi getMyLabels GET /me/labels Get my sensitivity labels
SalesTimApi.TeamsApi addTeamMember POST /teams/{teamId}/members Add a team member
SalesTimApi.TeamsApi archiveTeam POST /teams/{teamId}/archive Archive a team
SalesTimApi.TeamsApi createTeamChannel POST /teams/{teamId}/channels Create a new team channel
SalesTimApi.TeamsApi createTeamChannelTab POST /teams/{teamId}/channels/{channelId}/tabs Create a new team channel tab
SalesTimApi.TeamsApi createTeamProvisioningJob POST /teams/provisioning Create a new team based on a template
SalesTimApi.TeamsApi deleteTeam DELETE /teams/{teamId} Delete a team
SalesTimApi.TeamsApi getTeam GET /teams/{teamId} Get a team
SalesTimApi.TeamsApi getTeamChannelTabs GET /teams/{teamId}/channels/{channelId}/tabs Get team channel tabs
SalesTimApi.TeamsApi getTeamChannels GET /teams/{teamId}/channels Get team channels
SalesTimApi.TeamsApi getTeamPrimaryChannel GET /teams/{teamId}/channels/primary Get the primary channel of a team
SalesTimApi.TeamsApi unarchiveTeam POST /teams/{teamId}/unarchive Unarchive a team
SalesTimApi.TeamsApi updateTeam PATCH /teams/{teamId} Update a team
SalesTimApi.TemplatesCatalogApi getCatalogTemplates GET /catalog/templates Get teams templates
SalesTimApi.TemplatesCatalogApi getMyCatalogTemplates GET /me/catalog/templates Get my teams templates
SalesTimApi.UsersApi getUsers GET /users Retreive users from your Microsoft 365 environment
SalesTimApi.WebhooksApi createHook POST /hooks Create a new webhook
SalesTimApi.WebhooksApi deleteHook DELETE /hooks/{hookId} Delete a webhook
SalesTimApi.WebhooksApi generateHookSignature POST /hooks/signature Generate a signature from a secret and a webhook payload
SalesTimApi.WebhooksApi getHooksEvents GET /hooks/events Get webhooks events

# Documentation for Models

# Documentation for Authorization

# bearerAuth

  • Type: Bearer authentication (JWT)