AnsweredAssumed Answered

Launch an Error Translation Request works, Check fails

Question asked by Bruce Pennypacker on Sep 29, 2017
Latest reply on Oct 13, 2017 by Bruce Pennypacker

I'm trying to write a fairly simple python program to launch an error translation request and then subsequently check that the request has completed so I can fetch the results. I can successfully launch the translation request, but the subsequent checks are consistently failing with an error indicating that "The signature does not match".

The test scripts I've written are pretty trivial. They each authenticate with the API, print out the request URL, then submit the request and print out the results. Here's an example of the one that submits the translation request:

 

$ ./test1.py aa.bbbbbbbb.cccccccccc.ddddddd
POST /diagnostic-tools/v2/errors/aa.bbbbbbbb.cccccccccc.ddddddd/translate-error
{
"link": "/diagnostic-tools/v2/translate-error-requests/946237",
"requestId": "946237",
"retryAfter": 10
}

So I'm getting back a valid response, which means the script is authenticating properly, POSTing the request properly, etc. My second test script is just a copy of the first one, so the authentication code is identical but it just fetches a different URL. When I run it I get very different output:

$ ./test2.py 946237
GET /diagnostic-tools/v2/translate-error-requests/946237
ERROR: Call to /diagnostic-tools/v2/translate-error-requests/946237 failed with a 401 result
ERROR: This indicates a problem with authentication or headers.
ERROR: Please ensure that the .edgerc file is formatted correctly.
ERROR: If you still have issues, please use gen_edgerc.py to generate the credentials
ERROR: Problem details: {u'status': 401, u'requestTime': u'2017-09-29T14:24:43Z', u'title': u'Not authorized', u'detail': u'The signature does not match', u'serverIp': u'23.13.170.61', u'instance': u'https://akab-wjlfm4vesniffuph-hoc3vke2m3kseboo.luna.akamaiapis.net/diagnostic-tools/v2/translate-error-requests/946237/translated-error', u'requestId': u'68d19f16', u'clientIp': u'34.194.22.160', u'type': u'https://problems.luna.akamaiapis.net/-/pep-authn/deny', u'method': u'GET'}

What am I doing wrong here? From everything I've been able to find in the API documentation it appears that I'm making these requests properly.

Outcomes