Truly grateful for any help here:
Trying to trigger a Twilio Studio flow from Zapier but with no luck so far.
Here is the Twilio guidance on how to trigger an execution: https://www.twilio.com/docs/studio/rest-api/v2/execution
Here, for example, is how the required data looks as CURL (those phone numbers are not real don't worry):
curl -X POST https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions \
--data-urlencode "To=+15558675310" \
--data-urlencode "From=+15017122661" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
The required data is: To and From as well as the TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN authentication.
I would also like to pass through some data under Parameters as shown in this bit.
So the first step was the auth: Zapier was saying: "The app returned Authentication Error - No credentials provided".
Based on some other info, I have got past this (I think) by putting the Account SID and Auth token in the URL itself like this:
https://TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN#studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions
(Maybe better/neater to put with the parameters, let me know)
But after the problem is now passing in the To, From and Parameters.
"The app returned Missing required parameter To in the post body".
Here is how my Webhook Zap currently looks
Thanks you for any help!
You need to use Form as Payload Type:
For the basic authentication to work make sure to use a | to separate the username and password:
Related
I'm trying to import an xml report to Jira xRay - to a Test Execution item.
The documentation I can find makes reference to client_id and client_secret, which should be generated by Create API key. Create API key only generates one string, a token.
As such I can't figure out how to use just the token to submit the xml report.
For example, this command:
curl -H "Content-Type: application/json" -X POST --data #"cloud_auth.json" https://xray.cloud.getxray.app/api/v2/authenticate
I can't use it, as it needs client_id and client_secret. Also, the endpoint itself returns
Cannot GET /api/v2/authenticate
.
Using this command:
curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token" --data #"data.xml" https://xray.cloud.getxray.app/api/v1/import/execution/junit?testExecKey=XNP-23
from: https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST#ImportExecutionResultsREST-JUnitXMLresults
results in "{"error":"Invalid JWT: JsonWebTokenError: jwt malformed"}"
.
Please can anyone help?
first you need to clarify if you're using Xray on Jira server/datacenter or Jira Cloud, because they are different products and have slightly different APIs; besides Jira Cloud and Jira server/datacenter are also different products. To find out, you can ask your Jira admin for example.
If you’re using Xray Cloud, then this is documentation site.
In this case, in order to submit the JUnit XML report you need to make an authencation with a client id and client secret that you obtain on Xray API Keys section. The authentication request is detailed here, and that will return a token that you'll use on the second request.
The second request is an HTTP POST, as described here, and you need to pass the token obtained earlier.
The main REST API documentation site is this one.
If you’re using Xray on Jira server/datacenter, then this is proper documentation site.
In Xray server, the authentication mechanism is provided by Jira itself.
You can either use basic authentication or Personal Access Tokens (if you have Jira >= 8.14). This is detailed on Xray server/datacenter page dedicated to its REST API.
After choosing the authentication mechanism to use, you just need to make a HTTP POST request as detailed here.
There is an open-source GitHub project with some code snippets, both for Xray server/datacenter and cloud, using different test automation report formats and different authentication mechanisms.
I have faced the same error when I tried with postman, I have removed " from generated token from start and end position and passed token to API. That resolved this issue
When I change the {{contact.channel.address}} number to a different number that I receive form REST Parameters the message will not send.
I am trying to take a POST request that then triggers the Twilio Studio to call a store and tell them they have a new online order. They then press Keys to indicate how long the order will take to process and then I send a message to the customer telling them when to pick up their order.
When I keep the {{contact.channel.address}} the same the code runs correctly but when I change this it doesn't work anymore.
Found this link that says it cannot be changed for outbound call but it is possible to edit for send message
Does anyone know can I do this or is this functionality not support at all?
curl -X POST "URL" -d "To=+1xxxxxxxxxx" -d "From=+1xxxxxxxxxx" -d "Parameters={\"orderid\":\"12345\", \"name\":\"Johen\", \"phone\":\"+1xxxxxxxxxx\"}" -u SID:AUTH
Studio Flow
The {{contact.channel.address}} should be equal to the To you pass in when calling the Studio REST Api URL. In your example, "To=+1xxxxxxxxxx".
Is there a way to lookup a JIRA user by email (using the REST API Call)? I can't seem to find a function call that covers this ability. I am using JIRA 7.1.2 and need to make a rest call to JIRA to list out email ids based on the alphabets passed.
You can use the REST API to get a user from his email address.
curl -s -X GET -H "Authorization:Basic dXNlcm5hbWU6cGFzc3dvcmQ=" http://yourjiraurl.com/rest/api/2/user/search?username=username
According to Jira documentation the username parameter will be matched against the username, name or email address.
To get your username password encoded you can use the base64 command in linux.
echo -n username:password | base64
dXNlcm5hbWU6cGFzc3dvcmQ=
Replace this output in the first command since this call can not be made anonymously.
Here's the command I need to execute: (using the example API key)
curl -v -u 1971800d4d82861d8f2c1651fea4d212:api_token \
-X GET https://www.toggl.com/api/v8/workspaces/777/tasks
I am writing a dashing/sinatra based dashboard that shows a summary of the information from our Toggl account. My question is, how to I open this url in sinatra using something like
open('http://...) do |f|
A successful curl returns an array (json) that I can parse for the info I need.
I'm not entirely sure how to tackle this. I have some ideas but they aren't well formed enough to properly comment on them. I though I'd bounce this off of you all for inspiration and information.
I'm all ears.
Check out HTTParty. The example in the README shows basically exactly what you're looking to do using auth headers:
https://github.com/jnunemaker/httparty
I'm trying to sign a request with OAuth. I read a lot of articles on it, but I don't know how to actually use it right now.
I have this URL: https://userstream.twitter.com/2/user.json And I want to call it for a certain user. I have an app (with Consumer key en secret) and the API key for the account I want to use. So the only thing left to do is sign it.
I used this page: http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/ and got a code block that looked like this one:
GET /photos?size=original&file=vacation.jpg HTTP/1.1
Host: photos.example.net:80
Authorization: OAuth realm="http://photos.example.net/photos",
oauth_consumer_key="dpf43f3p2l4k3l03",
oauth_token="nnch734d00sl2jdk",
oauth_nonce="kllo9940pd9333jh",
oauth_timestamp="1191242096",
oauth_signature_method="HMAC-SHA1",
oauth_version="1.0",
oauth_signature="tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D"
However, cURL does not accept that. How do I construct something that will work with cURL?
Thanks in advance
EDIT: I don't really need cURL, just comething that I can use with C++ on GNU/Linux
When I've curled a Twitter request from the (Windows) command line, and had to add an OAuth authorization header, I've done it like this:
curl -k "https://userstream.twitter.com/2/user.json" --header "Authorization: OAuth realm=""Twitter API"",oauth_consumer_key=""dpf43f3p2l4k3l03"",oauth_token=""nnch734d00sl2jdk"",oauth_nonce=""kllo9940pd9333jh"",oauth_timestamp=""1191242096"",oauth_signature_method=""HMAC-SHA1"",oauth_version=""1.0"",oauth_signature=""tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D"""
Of course, if you're using that Java applet, be sure you've set the time as close to the correct time as possible, specified your OAuth credentials, and set the URL part appropriately before substituting the output values into the command line above.
Method: GET
URI Scheme: https
Host Name: userstream.twitter.com
Port: 443
Request Path: /2/user.json
Parameters: [remove all]
Note in the header output that you must manually change the realm to Twitter API, but all the other output values should be correct.
Additionally, this answer has a good selection of C++ Twitter libraries you could try, although the link to the Twitter documentation that lists is out of date -- here's the latest.