AWS Amplify: AmplifyException ‘You are not authorized to make this call.’

Question:

I have integrated aws amplify into and android app by following https://docs.amplify.aws/lib/q/platform/android in my mac book pro.

Now I check-out the same project into another machine mac mini. and trying to run.

I am getting this error, not sure how to fix it.

tried, amplify pull, amplify configure, amplify init. but none are able to resolve this issue.

thanks in advance

Answer:

Initially, you will see your graphql in Network tab failed because of Authorization.

“My case is App Sync API key is expried. – Freddie Jun 26”

This is the answer, go to Appsync / Settings / API keys.

You will see the “red” key. That means it has expired.

You just need to create a new key. Then replace this new key for appsync api inside your aws-exports.js under name aws_appsync_apiKey

If you have resolved this, I’ll just leave it here so someone else can see it.

Leave a Reply