I am trying to invoke the following:
twilio api:core:calls:create \
--method GET \
--url https://xxxxxxxxx.execute-api.us-east-1.amazonaws.com/play?job=1589297170910&record=2&username=992b512f-130d-4da6-a9d3-a1a4227f82f5 \
--to +19995551212 \
--from +12345678901
SID From To Status Start Time
CA283a5deadbeefcafe0c89e861d +12345678901 +19995551212 queued null
The endpoint in the --url parameter above returns TwiML, with a response like this:
HTTP/1.1 200 OK
Apigw-Requestid: M8x5Wgf9IAMEVmg=
Connection: keep-alive
Content-Length: 1154
Content-Type: text/xml
Date: Fri, 22 May 2020 20:04:12 GMT
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Play>https://s3.amazonaws.com/<my bucket name>/private/jobs/992b512f-130d-4da6-a9d3-a1a4227f82f5/1589297170910/2.mp3?AWSAccessKeyId=ASIA23STQFMZWXGL6GU2&Signature=3trMYp%2Fzc6ZV4FNRUc6%2B2Exen3k%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEPT%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIQDJyUkf%2FBrHEVBl2k3rKHpaAwyaObsObFqTxp53P%2FKghQIgHPH8Idf9cGZ4XR9zxbs%2FgbEuPmeOPO3%2FbNQQP%2F6LOf8q8QEITRAAGgw3NDY0MjU2OTA5MzEiDBK45eAIlYDHS04WHirOASI41mSxg6kEefiyQkZ969RopMhCFBdsXrUZWefUHrRqkFL209n%2BNLV0gKhAmyG8vvlRON74Zy3J05aIQ79%2BxFwYfKq9HLhvFskU%2B58Q8QmZlZtiPQ0KSGI2OuMceXaroRlVdfEBUJgMwR0EoXYGbf9XlXLgbK8%2BpLLtQ7MNAE4bTNE1%2FccQgq33s1wZfKyUKQGjeZkZEU2ISvDCvvUTsRgLMT9zM1thLszgm7eoaKv%2BdnfeFTKAEQDNaIFtGUwAihm5yaW6XphY8sUtccJoMLvgoPYFOuABojlUjGBEbxcXkk6nIMs6f1KYxc6USarhca13DgbrGnTdGG0CeD3KW9OByw2Cv6A7gyfAgAjSBzDyfC%2FScaYs6i4WdnZNO190d%2F3PoPMnL2kcxqRiWDo9lVXqGa03RekFKWgJGxxZ2nUXffBw9twDmZ%2BElVOZv2M2lhxOR8f06JbX3BtP0%2BE5RNxpRx0HUxeakZzrOcSqpS9OEESYB0E4UtOzrSqPJ0K7V%2B%2FhOldIoAyv%2Bdce1TZgrjgyMMjxemxQeKrtW7RSlXLh2S3SGtN7O2eg06h4YkoikzSWXsmfAOw%3D&Expires=1590782652</Play>
</Response>
The URL in the element above is an Amazon S3 signed URL for an MP3 file. It works fine if played directly in the browser. It also has the proper MIME type set for an MP3 file — audio/mpeg:
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 19010
Content-Type: audio/mpeg
Date: Fri, 22 May 2020 20:08:52 GMT
ETag: "68e63d2845abc6ed528445ab22de68f6"
Last-Modified: Fri, 22 May 2020 19:32:48 GMT
Server: AmazonS3
x-amz-id-2: M/ic62y1nbUEn4PA1THXqx4rdEpKV70C8L6EifAlREOnf7CaG+frpICoaStqn9fr4T9saEJu9qk=
x-amz-request-id: 118DFC99C7EA2F66
[...binary data truncated...]
When I receive my phone call, the message played is "We are sorry, an application error has occurred." I can't find any more debug info.
What am I doing wrong here? Is there an issue with using querystrings or urlencoded strings?
I failed to XML-encode my TwiML <Play> contents. A simple string replace from & to &.
Related
curl -i -XPOST 'http://127.0.0.1:8086/write?db=test' --data-binary $"inspec_reporting,profile=$profile success_control=$success_control,failure_control=$failure_control,skip_control=$skip_control,success_summary=$success_summary,failure_summary=$failure_summary,skip_summary=$skip_summary"
The above one is not working.
it is failing by adding special characters. When printed, not getting those special characters. Getting those special characters only with curl & influxDB.
HTTP/1.1 400 Bad Request
Content-Type: application/json
Request-Id: b60dd70d-ac82-11e9-9742-000000000000
X-Influxdb-Build: OSS
X-Influxdb-Error: unable to parse '$'inspec_reporting,profile=rhel7_enhanced_profile success_control=65,failure_control=72,skip_control=1,success_summary=252,failure_summary=211,skip_summary=1'': invalid boolean
X-Influxdb-Version: 1.6.2
X-Request-Id: b60dd70d-ac82-11e9-9742-000000000000
Date: Mon, 22 Jul 2019 13:15:01 GMT
Content-Length: 302
{"error":"unable to parse
'$'inspec_reporting,profile=rhel7_enhanced_profile
success_control=\u001b[38;5;41m65,failure_control=\u001b[38;5;9m72,skip_control=\u001b[38;5;247m1,success_summary=\u001b[38;5;41m252,failure_summary=\u001b[38;5;9m211,skip_summary=\u001b[38;5;247m1'':
invalid boolean"}
Can anyone solve the way I can generate akamai streaming token from the browser when the android app is not available?
I get this string from the app :
<--
POST /api/tibo324/getakamaitoken HTTP/1.1
Content-Length: 328
Content-Type: application/x-www-form-urlencoded
Host: tibodrm.appspot.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)
<--
auth=84Kwfr741QQv%252BnUMXtW%252FcbZ6aWNQKN0mCAVccmjo%252FXaf6PaB2pz7j3QqAlxHaj%252Fut%252Bu3vSzDt8NO%250AKqNBIgM7ckBedzNMkGOBRtlFfi3gAUuUzYvFN7U9ClHQKKWtfL%252F%252FyB2o1qyvGc2tY8i8lud%252F3tqg%250AhyjUvUD3Bib11V9aQqx8JOBslArMz%252FUaXLR0skPUETIeQatFmGmhFoyuyPhgbg%253D%253D%250A&AppID=v%252B10zWNKL8RJ8SY6LUSZXg%253D%253D%250A
-->
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 26 Dec 2017 22:24:09 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 118
Vary: Accept-Encoding
X-Powered-By: Express
ETag: W/"76-zi4HHRQAuAUejh/FF9M5ZFJtPek"
Via: 1.1 google
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
-->
?__token__=ip=00.000.00.000~exp=1514332929~acl=*~hmac=e9afdfe9f6b41c0ca14a16bc60a11253aecd432243789144c1ebaa70f23c615e
When I try to fetch the following URL:
https://tibodrm.appspot.com/api/tibo324/getakamaitoken?auth=84Kwfr741QQv%2BnUMXtW%2FcbZ6aWNQKN0mCAVccmjo%2FXaf6PaB2pz7j3QqAlxHaj%2FuFjEcIocduH6Z%0Awc5ZzKaqnmHhinePCNCcvQfh68bi2UvbZq04lBalY0job9%2FyVeuV1kh4hzWnP8sVuRozO27rFhSY%0AmDB8ck%2FuN0SqKEoxzycGUGhaZy3bjy88%2BhhwEMQknGNJ2j2JdMIHMT0AcLTFoQ%3D%3D%0A&AppID=v%2B10zWNKL8RJ8SY6LUSZXg%3D%3D%0A
I get a response in the browser:
Cannot GET /api/tibo324/getakamaitoken
What am I missing?
The answer is in your question: you can't GET the URL because it's accessed via POST only. And it looks like the POST requires an authentication string that's generated via the app. Making a POST without any data returns a descriptive error string:
$ http POST https://tibodrm.appspot.com/api/tibo324/getakamaitoken
HTTP/1.1 200 OK
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Wed, 27 Dec 2017 21:44:19 GMT
ETag: W/"31-zIZow+wVfq5Z3stS2NUNRdvP0go"
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
Via: 1.1 google
X-Powered-By: Express
{
"description": "no token at all",
"isValid": false
}
The inability to access the token generator through unauthenticated web calls is usually by design as the token is a protective tool Akamai provides customers to prevent access to content outside of the content provider's control.
In short, the content provider you're looking at doesn't want you to access their video outside of their application. If the application isn't able to access the video then you should reach out to the content provider to get that issue fixed rather than trying to circumvent their security scheme.
Here is a URL that shows the directory but no webpage name.
http://houstonballet.org/Academy/Summer-Audition-Tour/
How do I go about getting the exact webpage name? I tried plugging in index.html, index.asp, etc.
You can trace the http request/response via browser(chrome) devtools network tab
Full response header
HTTP/1.1 200 OK
Content-Length: 88706
Content-Type: text/html
Content-Location: http://houstonballet.org/Academy/Summer-Audition-Tour/Default.htm
Last-Modified: Tue, 24 Nov 2015 17:14:36 GMT
Accept-Ranges: bytes
ETag: "33476998db26d11:2011"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
http://houstonballet.org/Academy/Summer-Audition-Tour/Default.htm is your landing page
I have created a web service, i can see the wsdl in the browser but when i try to access it from soapUI i get the following error.
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 21 Jul 2015 14:00:57 GMT
Any ideas?
The request below fails and I am not able to figure out why, any insights?
var atom = ["<?xml version='1.0' encoding='UTF-8'?>",
'<entry xmlns="http://www.w3.org/2005/Atom" xmlns:docs="http://schemas.google.com/docs/2007">',
'<category scheme="http://schemas.google.com/g/2005#kind"',
' term="http://schemas.google.com/docs/2007#document"/>',
'<title>', titleDoc, '</title>',
'</entry>'].join('');
xhr.open('POST', URI , true);
xhr.setRequestHeader('Content-type', 'application/atom+xml');
//xhr.setRequestHeader('GData-Version', '3.0');
xhr.setRequestHeader('X-Upload-Content-Length', '0');
xhr.setRequestHeader('Authorization', 'OAuth ' + google.getAccessToken());
xhr.send(atom);
This is the request/response packet from the servers
Request URL:https://docs.google.com/feeds/upload/create-session/default/private/full
Request Method:POST
Status Code:400 Bad Request
Request Payload
<?xml version='1.0' encoding='UTF-8'?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:docs="http://schemas.google.com/docs/2007"><category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/docs/2007#document"/><title>test</title></entry>
Response Headersview source
cache-control:no-cache, no-store, must-revalidate
content-length:19
content-type:text/html; charset=UTF-8
date:Sun, 01 Jul 2012 06:46:21 GMT
expires:Fri, 01 Jan 1990 00:00:00 GMT
pragma:no-cache
server:HTTP Upload Server Built on Jun 14 2012 02:12:09 (1339665129)
status:400 Bad Request
version:HTTP/1.1
The repose with gdata Version uncommented, but this still does not create a doc in the google docs
HTTP/1.1 200 OK
status: 200 OK
version: HTTP/1.1
cache-control: no-cache, no-store, must-revalidate
content-length: 0
content-type: text/html; charset=UTF-8
date: Sun, 01 Jul 2012 21:02:16 GMT
expires: Fri, 01 Jan 1990 00:00:00 GMT
location: https://docs.google.com/feeds/upload/create-session/default/private/full?convert=false&upload_id=AEnB2UoaVeHUGhiIgKm9fL-WL_Fd1DdAAh7rdYDx6G6cseLwHgAMBfkdt42kf9YiKFJ8q9tiZ8vLVUb3Sr-KVUZi01m3vY6ZUw
pragma: no-cache
server: HTTP Upload Server Built on Jun 14 2012 02:12:09 (1339665129)
You can use simple upload to create an empty file, just replace your url with https://docs.google.com/feeds/default/private/full and uncomment the GData-Version header.
Another option (recommended) would be to use the files.insert method of the new Google Drive API instead.