How do I fix the error "DataStore - User is unauthorized"

1

React application when attempting to use any Datastore functions returns this warning in the console.

DataStore - subscriptionError Connection failed: com.amazonaws.deepdish.graphql.auth#UnauthorizedException DataStore - User is unauthorized to query syncFriendships with auth mode API_KEY. No data could be returned.

What is causing this error, how do I fix it, and get my app to where I can read and write data to the database? Note this backend works on a react native application. I have ran amplify pull and have all the changes locally. I am on day 7 of trying to fix this.

  • I have the same issue: My Expo project was working fine. After I installed TopTabNavigation my project got messed up. I started having issues with conflicting versions of dependencies specially for react-native-tab-view which I fixed with expo doctor --fix-dependencies, but then I got this error that I have not found in any forum yet: DataStore - User is unauthorized to query syncUsers with auth mode API_KEY. No data could be returned

    Can you help me? Thanks

asked 2 years ago157 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions