question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Signature mismatch on get_media for dfareporting

See original GitHub issue

Environment details

  • OS: macOS 10.14.4, linux
  • Python version: 3.7.4
  • pip version: 19.0.3
  • google-api-python-client version: 1.7.11

Steps to reproduce

Sorry, I cannot share the whole code, but the main idea is:

from apiclient import discovery
creds = OAuth2Credentials(...)
http = creds.authorize(http = httplib2.Http())
service = discovery.build('dfareporting', 'v3.3', http=http)  
service.files().get_media(...).execute()

I’m getting this error:

W0813 19:40:45.663586 1 http.py:118] Invalid JSON content from response: b"<?xml version='1.0' encoding='UTF-8'?><Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.</Message><StringToSign>GET\n\n\n1565725545\nx-goog-api-client:gdcl/1.7.11 gl-python/3.7.4\n/...</StringToSign></Error>"

I’ve tested the same code with version 1.7.10, and it works. I think this may be a regression introduced here, but I’m not sure: https://github.com/googleapis/google-api-python-client/pull/734

cc @busunkim96 @tseaver @dazuma

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
asiunovcommented, Aug 14, 2019

@busunkim96 👍 Thank you!

1reaction
busunkim96commented, Aug 23, 2019

The DFA Reporting backend cannot correctly process requests sent with the X-Goog-Api-Client header. Internal Issue 127940526

As a workaround, please use continue to use the previous library version. google-api-python-client==1.7.10 Thanks for reporting this @asiunov!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Signature mismatch. Authorization signature or client ...
The reason for signature mismatch is that the one you created is different than the one server created. Check the following –.
Read more >
Signature mismatch for execute api service · Issue #308 - GitHub
Describe the bug. Getting signature mismatch when using generated signature as bellow. SDK version number 0.1.0-preview.2.
Read more >
Get started | Campaign Manager 360 - Google Developers
The Campaign Manager 360 API provides programmatic access to information from your Campaign Manager 360 account. It's used to manage and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found