Apigee analytics export returns internal server error (500)

Hi there,

When issuing a valid POST request to the /analytics/export endpoint, we are constantly getting a 500 Internal Server Error response, with the payload:

{"error" : "Internal Error - Token has expired or not active yet\n" }

This exact same request had been working, but has recently started failing. 

Any ideas as to what has changed? or what we can do to fix the expired token?

Many thanks,

David

1 1 91
1 REPLY 1

Hi David,

This issue seems pretty straight forward, Google generated tokens have an expiration time, the default one is 3600 seconds, you can read more about this here.

So in order for you to generate a new token, you have different ways to perform this task depending on the scenario and who/why you're generating the token for 

That is explained in this documentation.

In order to get the new token from your own account, you can execute the following in your Cloud Console:

gcloud auth login
export TOKEN=$(gcloud auth print-access-token)

Now you can use the environment variable to execute the curl call, or you can try to perform this task through the Management API UI as well.

Let me know if you have any doubts.

Hope this helps!