Inspect element - how to get parameters sent to a redirected page and simulate it with postman? - redirect

In this link there is a quiz when you click on Start Now:
https://www.clinique.com/diagnostics
After the quiz finished, it posts data to a link and immediately redirects to another page with quiz results.
How to find out what data have been posted to the page and is there a way to simulate the final results with the Postman?

Looks like what you're looking for is the Postman Interceptor feature. It allows you to capture and inspect all the requests made from the browser/system you configure it to proxy to.
Then, once your request was captured, and after a bit of filtering (it'll capture every single request made to the server, not only the POST you're interested into) You will be able to replicate it with the Postman client like you'll do with a regular request. e.g. with the quiz you posted:
You'll find the data posted being sent as x-www-form-urlencoded (what a mess!) on a JSON key with the value:
{
"ProfileName":"04-NA-USA ELC Online 4.05.2017",
"QuizVersion":6,
"QuizAnswers":[
{
"attributeName":"welcome",
"attributeRecapValuesLocalized":"mens_concerns",
"recapColumn":1
},
{
"attributeName":"mens_concerns",
"attributeRecapValuesLocalized":"Eye Area",
"recapColumn":0
},
{
"attributeName":"mens_age",
"attributeRecapValuesLocalized":"50 - 59",
"recapColumn":1
},
{
"attributeName":"mens_eye_area_where",
"attributeRecapValuesLocalized":"Lines/Wrinkles",
"recapColumn":0
},
{
"attributeName":"mens_skintype",
"attributeRecapValuesLocalized":"oily-shiny,tight-uncomfortable",
"recapColumn":0
},
{
"attributeName":"mens_sensitivity_frequency",
"attributeRecapValuesLocalized":"Rarely",
"recapColumn":1
},
{
"attributeName":"mens_sensitivity_redness",
"attributeRecapValuesLocalized":"No",
"recapColumn":1
},
{
"attributeName":"recap",
"attributeRecapValuesLocalized":"",
"recapColumn":1
}
],
"SkinType":"2",
"SKUs":[
{
"Eye Area":[
"7YXH-01",
"7ELF-01",
"6TCR-01"
]
},
{
"Daily Care":[
"ZE4L-01",
"ZF7E-01",
"65EM-01",
"Z219-01",
"Z5WW-01"
]
}
],
"UPCs":[
{
"Eye Area":[
"020714632670",
"020714506827",
"020714382742"
]
},
{
"Daily Care":[
"020714734510",
"020714744762",
"020714104726",
"020714649562",
"020714682255"
]
}
],
"Concerns#1":"Eye Area",
"Concerns#2":"Daily Care",
"UsageOrderSKUs":[
"ZE4L-01",
"ZF7E-01",
"65EM-01",
"7YXH-01",
"Z219-01",
"Z5WW-01",
"7ELF-01",
"6TCR-01"
],
"UsageOrderUPCs":[
"020714734510",
"020714744762",
"020714104726",
"020714632670",
"020714649562",
"020714682255",
"020714506827",
"020714382742"
]
}

Related

Listing tags for a specific commit in Azure Repos using (ADO rest api )

I would like to see if there is any api that lists all the tags attached to a specific commit
if there is any api that lists all the tags attached to a specific
commit
For this issue , you can try the below rest api:
Request url:
POST https://dev.azure.com/{org}/_apis/Contribution/dataProviders/query/project/{proId}?api-version=5.1-preview.1
Sample request body:
{
"context": {"properties": {
"repositoryId": "46f31875-9df2-4cc7-9f2f-944cf7280d1c",
"searchCriteria": {
"gitCommitLookupArguments": null,
"gitHistoryQueryArguments": null,
"gitArtifactsQueryArguments": {
"fetchBuildStatuses": false,
"fetchPullRequests": false,
"fetchTags": true,
"startFromVersion": null,
"commitIds": ["1a4b0ea9b5c6fe004eb7a0df3e7fa3f146c0db27"]
},
"gitGraphQueryArguments": null
}
}},
"contributionIds": ["ms.vss-code-web.git-history-view-commits-data-provider"]
}
I catch this api in the Network of browser by pressing F12. Here is my test in postman:

"The agent returned an empty TTS" when action is not opened separately to asking an intent

When I invoke the skill with 'okay Google, ask {skillname} to {utterance}' I get the response 'The agent returned an empty tts" and the conversation closes. It doesn't even seem to hit my backend - I've tried hosting the backend code on both a local server and on AWS and the same issue happens in both cases. There's no log of the request being made either on Stackdriver on Google or on CloudWatch on AWS. The only response I get is the following in the debug tab:
{
"response": "The agent returned an empty TTS.",
"expectUserResponse": false,
"conversationToken": "EosDS2o4d0...",
"audioResponse": "",
"ssmlMarkList": [],
"debugInfo": {
"sharedDebugInfoList": [
{
"name": "Response Validation",
"debugInfo": "The agent returned an empty TTS.",
"subDebugEntryList": []
}
],
"conversationBuilderExecutionEventsList": []
},
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "The agent returned an empty TTS."
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 0,
"is3pResponse": true,
"clientOperationList": [],
"projectName": "",
"renderedHtml": ""
}
Nothing in any of the other tabs. When I try invoking the phrases in the same way on my phone, I just see a loading symbol and again nothing in the logs to say it's even hitting the backend.
Weirdly, this doesn't happen when I say 'okay Google, talk to {skillname} {utterance}' - this works absolutely fine.
All the intents work perfectly well when I've opened my action first, and then invoke them. I've built this using Jovo and published on Alexa also and the problem is only happening on Google.

calling UCWA with c# - lync 2013 server

I sent a get request to below url (I replaced my company's real domain name with xxx here)
http://lyncdiscover.xxx.com/?sipuri=abc#xxx.com
instead of getting this format according to many blog.
{
"_links":{
"self":{
"href":"https://lyncweb.sipdomain.co.uk/Autodiscover/AutodiscoverService.svc/root?originalDomain=sipdomain.co.uk"
},
"user":{
"href":"https://lyncweb.sipdomain.co.uk/Autodiscover/AutodiscoverService.svc/root/oauth/user?originalDomain=sipdomain.co.uk"
},
"xframe":{
"href":"https://lyncweb.sipdomain.co.uk/Autodiscover/XFrame/XFrame.html"
}
}
}
I got this format returned back without xframe (I replaced the domain with xxx):
{
"AccessLocation": "External",
"Root": {
"Links": [
{
"href": "https://lswebservice.xxx.com/Autodiscover/AutodiscoverService.svc/root/domain",
"token": "Domain"
},
{
"href": "https://lswebservice.xxx.com/Autodiscover/AutodiscoverService.svc/root/user",
"token": "User"
}
]
}
}
what do I miss here?
You will want to update your Lync Server 2013 environment - Updates for Lync Server 2013. UCWA went live with Lync Server 2013 (CU1) and what you initially hit is the Autodiscovery service which was updated in CU1 to return the format you are expecting above.
The information was contained on the last paragraph on ITAdmin-Configuration documentation.

How to ask permission in Actions on Google without the SDK?

I would like to know the name of the user, however I cannot use the nodejs sdk since I use another language.
How can I ask for permission?
I would prefer a way with the normal json responses.
I hacked this minimal script to get the JSON reponse which the nodejs sdk would return:
gaction.js:
const DialogflowApp = require('actions-on-google').DialogflowApp;
const app = new DialogflowApp({
request: {
body: {
result: {
action: 'Test',
contexts: []
}
},
get: (h) => h
},
response: {
append: (h, v) => console.log(`${h}: ${v}`),
status: (code) => {
return {send: (resp) => console.log(JSON.stringify(resp, null, 2))}
}
}
});
function testCode(app) {
app.askForPermission('To locate you', app.SupportedPermissions.DEVICE_PRECISE_LOCATION);
}
app.handleRequest(new Map().set('Test', testCode));
I'm still no node.js expert so this might be not an optimal solution. When you have installed node and run the command npm install actions-on-google, this will install the necessary dependencies.
When done you just need to run node gaction which will create this output:
Google-Assistant-API-Version: Google-Assistant-API-Version
Content-Type: application/json
{
"speech": "PLACEHOLDER_FOR_PERMISSION",
"contextOut": [
{
"name": "_actions_on_google_",
"lifespan": 100,
"parameters": {}
}
],
"data": {
"google": {
"expect_user_response": true,
"no_input_prompts": [],
"is_ssml": false,
"system_intent": {
"intent": "assistant.intent.action.PERMISSION",
"spec": {
"permission_value_spec": {
"opt_context": "To locate you",
"permissions": [
"DEVICE_PRECISE_LOCATION"
]
}
}
}
}
}
}
If you send now the JSON above you will be asked from Google Home. Have fun!
The request/response JSON formats for the API.AI webhooks with Actions is documented at https://developers.google.com/actions/apiai/webhook
As you've discovered, the data.google.permissions_request attribute contains two fields regarding the request:
opt_context contains a string which is read to give some context about why you're asking for the information.
permissions is an array of strings specifying what information you're requesting. The strings can have the values
NAME
DEVICE_COARSE_LOCATION
DEVICE_PRECISE_LOCATION
If you are using Java or Kotlin there is an Unofficial SDK. It matches the official SDK api nearly exactly.
https://github.com/TicketmasterMobileStudio/actions-on-google-kotlin

Update event does not work with EWS Access Denied

I am creating Meeting from application using EWS. With soap request
{
"body":{
"m:CreateItem":{
"attributes":[
{
"SendMeetingInvitations":"SendToAllAndSaveCopy"
}
],
"m:Items":[
{
"t:CalendarItem":{
"t:Subject":"Booked from application",
"t:Body":{
"attributes":[
{
"BodyType":"Text"
}
],
"value":"Meeting body"
},
"t:Start":"2016-03-02T13:11:59+00:00",
"t:End":"2016-03-02T13:45:00+00:00",
"t:Location":"room1",
"t:RequiredAttendees":[
{
"t:Attendee":{
"t:Mailbox":{
"t:EmailAddress":"room1#testdomain.onmicrosoft.com"
}
}
}
]
}
}
]
}
},
"headers":{
"Authorization":"Basic somestringsdafsdfsdfsdfsdfsf"
},
"additionalNamespaces":[
"xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\"",
"xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\""
],
"soapHeader":{
"t:ExchangeImpersonation":{
"t:ConnectingSID":{
"t:PrincipalName":"test007#testdomain.onmicrosoft.com"
}
}
},
"method":"POST",
"url":"https://outlook.office365.com/EWS/Exchange.asmx"
}
I am also trying to edit the meetings duration via application and it works fine also. With SOAP request:
{
"body":{
"m:UpdateItem":{
"attributes":[
{
"SendMeetingInvitationsOrCancellations":"SendToAllAndSaveCopy"
},
{
"MessageDisposition":"SaveOnly"
},
{
"ConflictResolution":"AlwaysOverwrite"
}
],
"m:ItemChanges":{
"t:ItemChange":{
"t:ItemId":{
"attributes":[
{
"Id":"AAApAHJvb20xQGNlcnR1c2ludGVybmF0aW9uYWwub25taWNyb3NvZnQuY29tAEYAAAAAAMWslF/s3JlHvuBz+Grw4nkHAMq37IYLqfhKh5oHo2fodacAAAAAAQ0AAMq37IYLqfhKh5oHo2fodacAAFweeHQAAA=="
},
{
"ChangeKey":"DwAAABYAAADKt+yGC6n4SoeaB6Nn6HWnAABcIvBS"
}
]
},
"t:Updates":{
"t:SetItemField":{
"t:FieldURI":{
"attributes":[
{
"FieldURI":"calendar:End"
}
]
},
"t:CalendarItem":{
"t:End":"2016-03-02T15:00:00+00:00"
}
}
}
}
}
}
},
"headers":{
"Authorization":"Basic somestringssdasasfasfasfasfaf"
},
"additionalNamespaces":[
"xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\"",
"xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\""
],
"soapHeader":{
"t:ExchangeImpersonation":{
"t:ConnectingSID":{
"t:PrincipalName":"test007#testdomain.onmicrosoft.com"
}
}
},
"method":"POST",
"url":"https://outlook.office365.com/EWS/Exchange.asmx"
}
Where problems starts is, when I create meeting from outlook.office.com using Exchange web interface. I get error with message:
Access is denied. Check credentials and try again., Cannot get ID from
name.
The SOAP request is the same except change keys. I have read on some similar problems that it might be due to the rights on calendar. I am not quite clear with that.
Could you please advise on this problem.
EDIT:
{
"t:ExchangeImpersonation":{
"t:ConnectingSID":{
"t:PrimarySmtpAddress":"test007#testdomain.onmicrosoft.com"
}
}
}
It maybe your impersonation header is test007 the Mailbox your trying to access or just the service account your using ?
I'd suggest you use the PrimarySMTPAddress to ensure you are specifying the Mailbox to access rather then a user eg
"t:ExchangeImpersonation":{
"t:ConnectingSID":{
"t:PrimarySmtpAddress":"test007#testdomain.onmicrosoft.com"
}
Also when you say
Where problems starts is, when I create meeting from outlook.office.com using Exchange web interface. I get error with message
Do you mean you get the error in the Outlook Web App or in your code ?
Cheers
Glen