Created
December 7, 2015 10:17
-
-
Save cw-oide/9c38db966354c39a3690 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ChatWorkにメッセージを投稿() | |
Dim myHttpRequest | |
Dim myURL | |
Dim myPostData | |
Dim Result | |
Dim room_id | |
Dim Token | |
room_id = ******* | |
myURL = "https://api.chatwork.com/v1/rooms/" & room_id & "/messages" | |
Token = **************** | |
myPostData = "body=" & メッセージの内容 | |
Set myHttpRequest = CreateObject("MSXML2.XMLHTTP.3.0") | |
Call myHttpRequest.Open("POST", myURL, False) | |
Call myHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") | |
Call myHttpRequest.setRequestHeader("X-ChatWorkToken", Token) | |
Call myHttpRequest.send(myPostData) | |
Result = myHttpRequest.responseText | |
Set myHttpRequest = Nothing | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment