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

530 views Asked by At

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?

1

There are 1 answers

0
Leland On BEST ANSWER

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.