简体   繁体   中英

Generate HMAC signature for Google Maps at work API on Apigee Edge

I am trying to generate a valid signature for the google maps API on Apigee edge.

I've tried using a javascript callout to no avail. I am able to generate signatures but they don't match what google expects. I suspect it has to do with the encoding of the crypto key.

I can't get python scripts to deploy at all (already opened a support case for that).

I'm using CryptoJS which I believe does not binary encode the key. Has anyone already solved the problem of calling the Google Maps API for Work with an HMAC signature?

I was able to make it work with Python. My solution is based mostly on Google's example script. I had to make changes to the line to decode the signature in order for it to work on Apigee Edge. Of course, this will only work for those who have a paid Apigee Edge account as the free version does not support Python.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM