I am trying to set up an incoming webhook to a Microsoft teams channel using the incoming webhook connector.
The payload that I am trying to send from my platform looks like this and is form CleverTap (which is failing so I'm trying to debug it using postman). but I am getting the error Summary or Text is required.
{
"profiles": [
{
"email": "jack#gmail.com",
"identity": "foo",
"objectId": "-g55b74fb1030740e4a4931910a8abb862",
"profileData": {
"Last Score": 308,
"High Score": 308,
"Replayed": true
},
"name": "Jack"
}
]
}
What am I doing wrong?
will I need to change the JSON payload according to the adaptive card syntax for teams to accept the incoming webhook? If so, where can I add my custom payload in the adaptive card JSON body?
are there other authentication factors at the webhook endpoint (do I have to whitelist the ip address from where the POST message is being sent from)?
To send a message using incoming webhook, you must post a JSON payload to the webhook URL. This payload should be in the form of O365 Connector card. Payload of any other format is not acceptable in Teams. Here is an Example Connector card that you can post. You can now also send an Adaptive card using incoming webhook. Please check the docs here.
Related
I'm migrating from Firebase where this was rather simple to do.
I'm building a custom api because the environment I need to build in will not let me use any official sdk's or anything, so this solely has to be done via rest type actions.
I essentially want to just post the username/password to aws cognito, and recieve an auth token that I can then append to the headers of future requests (to other api calls)
After hunting for quite a bit, almost all help has postman connecting to Amazon's login UI etc, and I cannot do that. It must completely handle the login process "behind the scenes" and not prompt the user with Amazon's own UI.
So, assuming this is possible:
What headers do I need (content-type etc)
How do I format the body json (or is it using something else?)
I assume I'd send it as "raw" body.
This is as far as I got so far and I'm scratching my head:
Url: https://[DOMAIN].auth.us-east-1.amazoncognito.com/oauth2/token
Body Json:
{
"ClientId": "1234etc",
"Password": "Password1_",
"UserAttributes": [
{
"Name": "email",
"Value": "test#test.com"
}
],
"Username": "test#test.com"
}
No idea if this is even the right format for the JSON I just scalped it from other posts.
I am trying to do a load test for one of my APIs in JMeter. The API works fine when tested in swagger or in postman. It gives the correct result. However, when I am trying to call the same API in JMeter, it is throwing following error-
"errors":{"$.catIds[0]":["The JSON value could not be converted to System.Collections.Generic.List`]
Below is my request JSON (using the same in postman where it works perfectly)
{
"StdFilterParams": {
"name": "Anna",
"grade": "V",
"schedules": [
0
]
},
"SubList": {
"startTimes": [
"0"
],
"endTimes": [
"101010"
]
},
"catIds":
[
4001
]
}
Here, it doesn't allow me to run the request with this JSON with catIds =4001. My question is what is wrong with this request even if it works in postman.
Are you sure you're sending the same request in JMeter as in Postman?
For example there is a popular mistake that people forget to add Content-Type header via JMeter's HTTP Header Manager
In general if request works in Postman you can just record it using JMeter's HTTP(S) Test Script Recorder
Start HTTP(S) Test Script Recorder
If you're using HTTPS protocol - import JMeter's self-signed certificate into Postman
Configure Postman to use JMeter as the proxy
Run your request in Postman
JMeter will capture the request and generate the relevant HTTP Request sampler and the HTTP Header Manager
More information: How to Convert Your Postman API Tests to JMeter for Scaling
I am trying add screenshot with log in reportportal but getting error message when trying to do so.
{
"responses": [
{"message": "ReportPortalException: Binary data cannot be saved. There is no request part or file with name screenshot",
Request payload containing the post details. Attached screenshot of postman is describing form data details
[
{"file": {
"name": "screenshot",
"contentType" : "image/jpeg"
},
"item_id": "5dca6e8fb9d8210001df81df",
"level": "Log info",
"message": "Result=Failed",
"time": "2019-10-23T21:27:33.280Z"}
]
Postman post image
Screenshot should attach with log in reportPortal
Notice that ReportPortal expects you to send multipart request where the first part is json body and second one is file itself. Moreover, filename from binary part should be specified in json part. Here you can find some details.
https://reportportal.io/docs/Logging-Integration%3Emultipart-logging-request-example
In your example, you send 'json_request_part' as json file which is not json body (not a file) that ReportPortal expects to see
It looks like starting from latest versions Postman does support this:
Tool for sending multipart/form-data request
I have been trying to create a very simple Logic App in Azure but I keep failing because it does not seem to be accepting my JSON.
Using my payload
{
"userPrincipalName": "notmy#ddress.com",
"computerName": "MyComputername"
}
I created the trigger
I then use the values of my payload in my response:
Save it and then I POST using Hurl.it to the HTTP POST URL in the request.
So why the heck is the value not used? I'm not able to use any of the values I'm sending.
Okay.. that was dumb..
I had to add the Content-Type header to the POST:
I am trying to figure out the best way to handle extra JSON returned on a 200 Success from Google App Engine.
Here is a sample of the JSON being returned from GAE
{
"username": "yo",
"password": "yo",
"email": "yo",
"id": "5654313976201216",
"kind": "photoswap#userItem",
"etag": "\"XUjxKcsckN9zXROpZ4Yj2GJxcXg/L6Zg-XPyGcr_RGBFQBwHhIYcdBQ\""
}
This does not work with the User Model that I have developed, and was causing issues because of the gson json mapping. The fields "kind" and "etag" are not part of the response message that I created, and was wondering if there is a way to remove that from being sent back from the server.
The api I have developed is written in Python
As of right now I just included those 2 values in my User Object Model, but I would like to not have to.