Skip to main content

No project description provided

Project description

Import

import MsTeamsConnector

Authorize

SCOPE param is optional and set to .default as default

credentials = {
    'CLIENT_ID': '{client_id}',
    'AUTHORITY': 'https://login.microsoftonline.com/{authority}',
    'USERNAME': '{user}',
    'PASSWORD': '{pass}',
    'SCOPE': [{scope_1}, {scope_2}]
}   
msc = MsTeamsConnector(credentials)  

Send message

Init Message

msc.create_message(team_id = team_id, channel_id = channel_id)  

Add title

msc.add_title('Test Graph API message')  

Add HTML text

msc.add_text('Test msg using Graph API')

Add text with mention

msc.add_text('Test msg using Graph API. Mention <at>{User Name}</at>')

Set importance level Can be only high or normal

msc.set_importance('high')

Set message to reply

msc.set_reply_message(message_id)

Send message

msc.send_message()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MsTeamsConnector-0.1.7.tar.gz (3.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page