Discussions
Unable to download recording, redfirected to the login page even with a valid auth token
I am subscribed to events using websockets, which is fine. I can also make other API calls; the token is active and never expires; in the request header, I am sending the token as specified: Authorization: Bearer XYZ, but I am still getting a redirection to the login page. The URL for the mp3 is obtained from any of these events: hangup, recording, adminrecording. Here is an example:
Here is an example using the httpie command line, but I am doing the same thing with the Python Requests library.
I think it is only happening for the admin recordings, not normal recording, but this is just a guess
Admin Recording event snippet:
"state": "admin_recording",
"recording_details": [
{
"id": 5067126874701824,
"url": "https://dialpadbeta.com/blob/adminrecording/5067126874701824.mp3",
"duration": null,
"recording_type": "admincallrecording",
"start_time": 1739210282241
}
],
"admin_recording_urls": ["https://dialpadbeta.com/blob/adminrecording/5067126874701824.mp3"]
Request:
http --all -F -A bearer -a 'XYZ' "https://dialpadbeta.com/blob/adminrecording/5067126874701824.mp3"
Response:
http --all -F -A bearer -a 'XYZ' "https://dialpadbeta.com/blob/adminrecording/5067126874701824.mp3"
HTTP/1.1 302 Found
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Length: 0
content-type: text/html; charset=utf-8
date: Fri, 14 Feb 2025 20:49:53 GMT
location: /login
server: Google Frontend
set-cookie: GOOGAPPUID=513; Path=/; Secure; HttpOnly; SameSite=None
via: 1.1 google
x-cloud-trace-context: c20f6f48bdf234471416459ee279b178
HTTP/1.1 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Transfer-Encoding: chunked
content-encoding: gzip
content-security-policy: frame-ancestors 'self';report-uri /api/csp_report
content-type: text/html
date: Fri, 14 Feb 2025 20:49:53 GMT
server: Google Frontend
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
via: 1.1 google
x-cloud-trace-context: e0106af8f4f288921416459ee279baa3
x-content-type-options: nosniff
x-frame-options: sameorigin
x-xss-protection: 1; mode=block
-- CONTENT --
<!DOCTYPE HTML>
<html>
<head>
<title>Dialpad Login - Leading Cloud Communication Platform</title>
...
...
-- END OF CONTENT --
I need to point out that it works for this recording but not for the previous one:
Recording event snippet:
"state": "recording",
recording_details": [{
"id": 6449248273301504,
"url": "https://dialpadbeta.com/r/6449248273301504",
"duration": 10000,
"recording_type": "callrecording",
"start_time": 1738266264002
}],
"recording_url": ["https://dialpadbeta.com/r/6449248273301504"],
Response:
HTTP/1.1 302 Found
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Length: 0
content-type: text/html; charset=utf-8
date: Fri, 14 Feb 2025 20:56:15 GMT
location: https://dialpadbeta.com/secureblob/callrecording/6449248273301504?apikey=<valid sandbox api key was here>
server: Google Frontend
set-cookie: GOOGAPPUID=513; Path=/; Secure; HttpOnly; SameSite=None
via: 1.1 google
x-cloud-trace-context: 9bac522ef33ac81ac6767f68dbff4189
HTTP/1.1 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Transfer-Encoding: chunked
cache-control: max-age=86400
content-security-policy: media-src 'self';font-src 'self';img-src 'self';default-src 'none';report-uri /api/csp_report
content-type: audio/mpeg
date: Fri, 14 Feb 2025 20:56:15 GMT
server: Google Frontend
strict-transport-security: max-age=31536000; includeSubDomains
via: 1.1 google
x-cloud-trace-context: 8b7becd431429d5cc6767f68dbff42ce
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+