UCWA - getting all meetings not just ones you scheduled - api

I have managed to use the UCWA API for Skype for Business to pull back online meetings, however, this only seems to get information for meetings scheduled by the user themselves. Is there a way to view all scheduled meetings for the user?
This is the request I have been using:
GET /ucwa/oauth/v1/applications/10XXXXXX052/onlineMeetings/myOnlineMeetings HTTP/1.1
Host: lywebext.contoso.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Accept: application/json
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Authorization: Bearer cwt=AAEBHAEFAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
Upgrade-Insecure-Requests: 1
I have looked at other endpoints such as onlineMeetingInvitation but none of them seems to give meetings scheduled by other people with the user in question.
Thanks!

Related

Restsharp, responce as chunked with diffent JSON documents

Hello I have made a request to a http server as an event service. This server sends events as chunked data. Because there are diffrent events, I got diffrent JSON documents.
Question 1. How to read this data everytime I get a new pice of data, not only if the connection is closed?
Question 2. How to parse the JSON in different Objects, depending on the event and have this as a return type?
The http stream looks like:
GET /OTEvents?subscriptionId=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlhdCI6MTUyNzY2MTg0MX0.fxsP4bLNzqSSFtYsTNmyyV4bM-OBwhcwhy-w_HwQYmQ HTTP/1.1
Host: myserver.com:8014
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,de;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
HTTP/1.1 200 OK
Date: Wed May 30 08:31:22 CEST 2018
Server: donoa
Content-Type: application/json
Transfer-Encoding: chunked
3d
{"eventName":"OnChannelInformation","text":"Chunk started"}
262
{"eventName":"OnCallCreated","loginName":"oxe11","callRef":"1b460e5b1f3c0100","callData":{"initialCalled":{"id":{"phoneNumber":"11"}},"state":"RINGING_INCOMING","tags":[],"capabilities":{"addMedias":[],"redirect":true,"pickedUp":true,"redirectToVoiceMail":true,"terminate":true}},"legs":[{"deviceId":"11","media":"AUDIO","state":"RINGING_INCOMING","capabilities":{"answer":true}}],"participants":[{"participantId":"198","identity":{"id":{"phoneNumber":"198"},"firstName":"Raum 2.1","lastName":"Hotline","type":{"main":"EXTERNAL","subType":"pbx"}},"medias":[],"mediaCapabilities":[]}],"deviceCapabilities":[]}
148
{"eventName":"OnCallModified","loginName":"oxe11","callRef":"1b460e5b1f3c0100","modifiedLegs":[],"addedLegs":[{"deviceId":"99999851","media":"AUDIO","state":"RINGING_INCOMING","capabilities":{"answer":true}}],"removedLegs":[],"modifiedParticipants":[],"addedParticipants":[],"removedParticipantIds":[],"deviceCapabilities":[]}
The chunk data is received asynchronously. I'd like to generate from every chunk an "event" object and call back my main function.

Headless chrome does not send Accept-Language header

In testing headless chrome I have noticed that it does not transmit the Accept-Language header entry. I have confirmed that it does get sent when there is a visible browser window.
Is there a reason for this and does chrome have an option to require/force it to send these normal values?
To see this, you can fire up Fiddler and type this at the command line:
chrome --headless --incognito --window-size=1920,1080 --disable-gpu --no-sandbox http://www.daringfireball.net/
In the Fiddler inspector (raw view) you'll see this:
GET https://daringfireball.net/css/ie_sucks HTTP/1.1
Host: daringfireball.net
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/65.0.3325.181 Safari/537.36
Accept: text/css,*/*;q=0.1
Referer: https://daringfireball.net/
Accept-Encoding: gzip, deflate
Whereas running the same command without --headless gives you this:
GET https://daringfireball.net/css/ie_sucks.php HTTP/1.1
Host: daringfireball.net
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Accept: text/css,*/*;q=0.1
Referer: https://daringfireball.net/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
When running headless mode, set the following as an option:
'--lang=en-GB'
It would appear that Accept-Language is a user-profile header sent only when the browser has a confirmed user specifying a language and as headless has no user it can/does not send that header. This was raised in these posts and looks to be a lacking feature for the foreseeable future:
https://github.com/SeleniumHQ/selenium/issues/4437
https://bugs.chromium.org/p/chromedriver/issues/detail?id=1925

recreate this web request in vb net

i?m trying to make automatic image set in pinterest account with WebClient.
I'd like to recreate this http request:
(Request-Line) POST /upload-image/?img=Desert.jpg HTTP/1.1
Host www.pinterest.com
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding gzip, deflate
X-Requested-With XMLHttpRequest
X-File-Name Desert.jpg
Cache-Control no-cache
X-CSRFToken RqwJCawJyAGYIZfzob51qxrEGj4GJcSA
Referer https://www.pinterest.com
Content-Length 846128
Content-Type multipart/form-data; boundary=---------------------------5431268530037
Cookie _pinterest_cm=TWc9PSY1YlkwcmtVRGlNRzRQZXpiZXJseVl6TnFHYnEvZlhpNDZPcExCQnhKN3UvdUUveWI0c3p4bWJKUmhoZy9YRG9sS3dNZTZFSFNhN2V3VWhJM1JkbUlxbC92VjhHUGFldlRTVVJTNlA1L1M0SDE5QXhLcHVWS2ZrSUh3NTN2ODA0WSZ5dnpJQkVRUmx5TVJGTEdmQm5EVmRGQXNqbDQ9; csrftoken=RqwJCawJyAGYIZfzob51qxrEGj4GJcSA; _pinterest_sess="TWc9PSYvRm93OFNxbGkxWTJ5bzVoZUFudHJVVDI4bndmL2I5SFVIQjZkVk1KWFJ3WDBmNndOWFR0QnBPazltZFRmcnJpcGU5akhQZS8vcEZWTzM5ODJWNVdKS2syekwwc1p1TVVNeEt3Z3NYa1lsMVFXcFpXYUdkRlE1RElQYTBYeXhyQkFkYVFmSHZnVkRyYWhYcURDYzhhWEpuR2dvekE1SlB6cXp4akNNdzJ6QysrR2MzRGNyRXJKczRuRHZDTm1uQkdLMUJrUnF6UjdZakhDUGNVRnQ4T1ZoQUFIQWJSU1VNUHNjUHV5VjlZbk1INU1FMFNhdGJiVFZRdUNDWFNlMGJvcDBFeXk4a3cxT25ROHpSOXFzcTZ6NFBHekFjNkFNQUtnaktQNGQ1VkhnNDdlSXNQTGhmTzhDWm5UaDNoZzdqbEFHQWQ1RjJXWVo5bjNXVkVUWnVUWXNiL1JLTFdqNDBvMWllT0VyRDRNN1lXN0diQmlWRjdGdWF5UGUzYkNLYlMvamJUSVFwcFZoVVVUL2ROVkFIQUNYODQxR3R5eDFrQ0VpTGhmaGZ1Y2VOdGt6aUdLQmtCTkRYdkpkVGhmLzMvMnVOWHAwQVdZWEs2alE4eTUwd3E1SlJPRWFDc3VKTXByb2tISm8rcldRQT0mejAwN0hvdlRhbU8zYmNJT0lsSm9PSldheGpJPQ=="; sessionFunnelEventLogged=1; __utma=229774877.448600758.1436737610.1436739423.1436745191.3; __utmz=229774877.1436737610.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); c_dpr=1; __utmc=229774877; _b="ARLbRMvYKUdKiaBWDA2Oxko87z7iIN4MuGnJALvZK8vehgzT11AKeoa13PH4l9VjVMU="; _pinterest_pfob=disabled; __utmb=229774877.3.9.1436745219732; __utmt=1
Connection keep-alive
Pragma no-cache
I have try this code, but i can't obtain Content-Length and Content-Type.
Dim wc As New WebClient
wc.UseDefaultCredentials = True
wc.Credentials = New NetworkCredential("pippomio#yahoo.com", "88Y71nR3764")
wc.Headers.Add("Host", "www.pinterest.com")
wc.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5")
wc.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
wc.Headers.Add("Accept-Language", "it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3")
wc.Headers.Add("Accept-Encoding", "gzip, deflate")
wc.Headers.Add("X-Requested-With", "XMLHttpRequest")
wc.Headers.Add("X-Requested-With", "XMLHttpRequest")
wc.Headers.Add("X-File-Name", "Hydrangeas.jpg")
wc.Headers.Add("Cache-Control", "no-cache")
wc.Headers.Add("X-CSRFToken", token)
wc.Headers.Add("Referer", "https://www.pinterest.com")
wc.Headers.Add("Connection", "keep-alive")
wc.Headers.Add("Pragma", "no - cache")
Dim Response As Byte() = wc.UploadFile("https://www.pinterest.com/upload-image/?img=Hydrangeas.jpg", "POST", "Hydrangeas.jpg")
In wich way can I do this request in vb net?
Thanks
First, I recommend you to check this and this tutorial to learn how to send/receive HTTP requests on correct way.
Second, you should not re-do any web browser actions in your program since it is usually not a good practice as the frontend architecture should be subject an unexpected change any time. Instead of this, you should check Pinterest API, especially the Users API which can help you to achieve your plans. Usually API interfaces are not a subject of random changes, they are more reliable than replaying front-end operations and more stable, has more capabilities to the load.
(Pinterest API seems working only from Firefox, if you get an empty area at right side with a big "None" text, then browse the link from Firefox - it seems can handle the page)

POST data not sent in IE 11 using the WebBrowser control

I have the following JavaScript code being executed inside of an onclick event handler on my website.
var newRequest = new window.XMLHttpRequest();
newRequest.open('POST', '/index.cfm', true);
newRequest.send('q');
If I use IE 11 and open up my web page that is located on a testing server I can see that the request gets sent as expected using Fiddler with a content length of 1 and 'q' in the post data. However, if I open up my application that hosts the WebBrowser control and navigate to the same website on my test server and have it execute the above code I can always see that the request is being made but that the Content-Length header is 0 and 'q' is not sent along with the request. Here is the failing request as it appears in Fiddler.
POST http://test.mycompany.com/index.cfm HTTP/1.1
Accept: */*
Referer: http://test.mycompany.com/Curtis/BrowserTests/BrowserEventTests.html
Accept-Language: en-US
Content-Type: text/plain;charset=UTF-8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: test.mycompany.com
Content-Length: 0
Connection: Keep-Alive
Pragma: no-cache
If I then set the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION registry value for my executable to 9000 then it works and does send the post data as expected.
Here is the correct request as reported by Fiddler.
POST http://test.mycompany.com/index.cfm HTTP/1.1
Accept: */*
Referer: http://test.mycompany.com/Curtis/BrowserTests/BrowserEventTests.html
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: test.mycompany.com
Content-Length: 1
Connection: Keep-Alive
Pragma: no-cache
q
If I change that value back to 10000 or 11000 then it does not work. Does anyone have any ideas on why the post data would not be sent properly using the WebBrowser control? I have reset my IE settings back to factory default with no change in behavior.
Update: If I change the JavaScript to look like this instead then it works with the emulation mode set to 10000.
var newRequest = new ActiveXObject("Msxml2.XMLHTTP");
newRequest.open('POST', '/index.cfm', true);
newRequest.send('q');
Is this just a bug that needs to be reported?

Worklight: WL.Client.addGlobalHeader() has no effect

When I add the line
WL.Client.addGlobalHeader("MyCustomHeader","abcdefgh");
inside of my main js file like so
function wlCommonInit(){
WL.Client.addGlobalHeader("MyCustomHeader","abcdefgh");
(...)
like it's described in the documentation (http://pic.dhe.ibm.com/infocenter/wrklight/v5r0m5/topic/com.ibm.worklight.help.doc/apiref/r_wl_client_addglobalheader.html) this has absolutely no effect all request send after that:
GET /apps/services/preview/MobileOPMClient/common/0/default/images/icons/icon_settings.png
HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Accept: image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/30.0.1599.66 Safari/537.36
Referer: http://localhost:8080/apps/services/preview/MobileOPMClient/common/0/default/MobileOPMClient.html
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,de;q=0.6
Cookie: JSESSIONID=1e1fig7holfdpeuc46w6jmrph; testcookie=oreo
Why is there no line
MyCustomHeader: abcdefgh
Background: I would like to allow local caching of javascript-files to debug them in chrome.
spyro
Global headers are added for requests made by WL client API, for example WL.Client.connect(), WL.Client.invokeProcedure() etc.