I was trying to capture webhook response when i am creating the task from inside podio dashboard but i can't receive any response in webhook.site
Used Postman, auth2.0 validation to create and validate the webhook
POST request for creation was
https://api.podio.com/hook/space/7026308/
Request body was
{
"url": "https://webhook.site/e664de7d-b571-42f0-8844-19723ae64caf",
"type": "task.create"
}
Response i get was
{
"hook_id": 17701094
}
Then In webhook.site i got this message
hook_id=17701094&code=51cf7340&type=hook.verify
Then i fire validate POST method from POSTMAN
My POST request was this
https://api.podio.com/hook/17701094/verify/validate
request body was
{
"code": "51cf7340"
}
Response was blank
Then i created a task inside from podio dashboard but i didn't receive any response in my webhook.site
Please provide solution for my problem
To verify a webhook, you need to call the /hook/{hook_id}/verify/validate API end-point with the hook_id and the code.
To do this, you need to be authenticated to the API, so you cannot just do a POST from Postman.
You should code for this in your webhook.site portal. If a POST request comes in with type=hook.verify, authenticate to the API and call /hook/{hook_id}/verify/validate.
For more, see the docs: https://developers.podio.com/doc/hooks/validate-hook-verification-215241
Related
I have a HTTP POST set up in Postman that is working correctly. I also have an Azure Logic App that I need to invoke that HTTP POST instead of Postman. I see in Azure Logic Apps you can have an HTTP POST like so:
In Postman, it will give you the HTTP code snippet. I have tried different formats but I can't seem to get the POST to work like it does in Postman.
My Postman POST has authentication and form-data in the body which show up in the HTTP code snippet but when I paste that into the Body of the HTTP request in the logic app, the request fails.
Any ideas of what I'm doing wrong?
There's no importer ready to use. You need to convert whatever you have on Postman into this connector.
You should add headers (Authorization and Content Type)
Authorization: Bearer ey1230218312 (replace with valid token)
Content-Type : application/x-www-form-urlencoded
Body: name=abc&age=30
I'm designing a Logic App in Azure, is there any way to make two HTTP request like this :
1. I'm calling my Identity Server 4 to get a new access token
2. I want to get the access token from the first request, put it to header and call .Net Core Api Endpoint with it?
Thanks
per my understanding, you want to know how to get access_token value from a JSON object which comes from response of get token http request .
I did a simple demo for you :
The details of the post request :
This is a simple request to get access token in Azure. the response will be :
{
"token_type": "Bearer",
"expires_in": "3600",
"ext_expires_in": "3600",
"expires_on": "1557995356",
"not_before": "1557991456",
"resource": "<-resource name->",
"access_token": "<-value of access token->"
}
As you can see this logic app is triggered by http request and it will do a post request to get an JSON object which contains an access_token. And finally it will return the access_token value in response .
So the key here is how to config so that we can get access_token value from the JSON response of step2 .
Let's open logic app code view, find "response" =>"body" and modify its value as : "#body('HTTP').access_token"
So that you can get the certain param from your JSON response of previous http request :
You can use the response of the first request by using Parsing JSON action.
Update
The link below is used to request token and refresh token depending on a field in the body:
http://example.com/token
1 Request a token
A field in the body: grant_type:password
Steps:
1 When the request arrives, APIM forwards it to 3rd party
2 Once APIM receives the reponse from 3rd party, it returns the result to its client.
We want to log data (url, response status code) for this url to Table Storage. Requet for the same url is not logged below:
2 Refresh the token
A field in the body: grant_type:refresh_token
Application Insight is used with APIM, I wonder if Table Storage is the best tool.
Is there built-in UI that is available for viewing data stored in Table Storage
Any information or link or code sample would be appreciated.
C#
VS 2017
APIM has a few ways to send data out of request processing pipeline:
send-request/send-one-way-request allows you to send an HTTP request, you're in charge of constructing request in HTTP terms: method, URL, headers, body.
log-to-eventhub allows you to send a message to EH. You can specify C# expression that produces message payload.
AppInsights integration will allow you to record client request, backend request, backend response, and client response for each request processed by APIM. You can configure it to log extra headers and part of body.
I am not sure where/how to set up a webhook in servicem8. I want to trigger an update when a Job status changes from Quote to Work Order.
I have read the documentation, but am not clear on the process.
Webhooks in ServiceM8 are only supported when using OAuth authentication using an access token, so you will need to register for a free developer account to get your OAuth Client Id and Secret. If you have not yet done so, follow the steps listed here:
http://developer.servicem8.com/docs/the-basics/public-applications/
Once you have OAuth authentication working, Subscribe to the 'Job' webhook to receive notifications when job data has changed. Do this by POSTing to https://api.servicem8.com/webhook_subscriptions
As mentioned on http://developer.servicem8.com/docs/platform-services/webhooks/ , the subscribe request should include:
object='job'
fields='status'
callback_url - Set this to the URL you wish to receive notifications
Once you subscribe to the webhook, you will immediately receive a request at your callback url to challenge you own this url. The request will contain URL parameters mode=subscribe, and a challenge value. To successfully confirm the challenge request you need to return a 200 result, with the body of the response set to the challenge code.
If you successfully confirm the challenge code request, you will start receiving notifications at your callback_url for any changes to job data within your ServiceM8 account. The notification you receive will contain JSON data similar to
{
"object": "job",
"entry": {
"changed_fields": ["status"],
"time": "2015-01-01 00:00:00",
"uuid": "de305d54-75b4-431b-adb2-eb6b9e546013"
},
"resource_url": "https://api.servicem8.com/api_1.0/job/de305d54-75b4-431b-adb2-eb6b9e546013.json"
}`
I have deployed my api on aws amazon api gateway and If I go through resource and make a request to an endpoint, I am able to get the response however when I go to stages and invoke url with params and x-api-key then I don't get any response with warning 'Unexpected 'N'' and 'Not Acceptable'. How is it possible that output is changed after deploying?
I found out what I was doing wrong, for all the post request body needs to be sent as form-data, when I changed body from form-urlencoded to form-data, I got the response...Thats very naive of me.