We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f028c06 commit af00da7Copy full SHA for af00da7
examples/local_attachment.py
@@ -0,0 +1,16 @@
1
+import os
2
+import sys
3
+from webexteamssdk import WebexTeamsAPI, ApiError
4
+
5
+cwd = os.path.abspath(os.path.dirname('.'))
6
+sys.path.append(cwd)
7
+testfile = '/'+cwd+'/test.png' #expected format: '//Users/userid/dir/test.png'
8
9
+file_list = []
10
+file_list.append(testfile)
11
12
+token = 'your_bot_token'
13
+api = WebexTeamsAPI(access_token=token)
14
+headers = {'Authorization': 'Bearer '+token}
15
16
+api.messages.create(roomId='your_room_id', files=file_list)
0 commit comments