Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upGraphQLError: Request failed with status code 401 #2783
Comments
This comment has been minimized.
This comment has been minimized.
@V1j1 your api key should be expired, you can go to AWS AppSync console to create a new one and you will need to update that key on your aws-exports file/amplify config as well. |
This comment has been minimized.
This comment has been minimized.
thank you @elorzafe . That fixed the problem! |
This comment has been minimized.
This comment has been minimized.
Hi I am having the same issue, but only with my deployed site. Is there any extra configuration that needs to be done after deploying the app through amplify? I noticed that aws-exports.js file is automatically ignored by .gitignore file. could that be the reason of this error? the login feature with incognito works fine though. Thanks |
This comment has been minimized.
This comment has been minimized.
@vdiaza were you able to resolve the issue you were facing? I'm having a similar issue. |
This comment has been minimized.
This comment has been minimized.
@adhikarisandeep not really. I ended up using the hosting provided by the amplify cli. |
** Which Category is your question related to? **
Amplify graphql react-native
** What AWS Services are you utilizing? **
Amplify
** Provide additional details e.g. code snippets **
My code was working perfectly fine for weeks and today all of a sudden I am getting this error:
Opening exp://127.0.0.1:19000 in iOS simulator
error: Object {
"data": Object {},
"errors": Array [
[GraphQLError: Request failed with status code 401],
],
}
I am new to aws amplify, graphql and react-native etc so my troubleshooting skills are limited. So far, I have regenerated the aws access key, secret key. My graphql schema exists in my aws account. I am using API key authentication for AppSync and key, API endpoint looks correct in aws-exports.js.
Any other ideas for troubleshooting?