AWS Amplify AppSync Cognito User Pool

0

Hello there, I've Cognito configured to authorize my users. The sign in and sign up is working fine. Now I want my users to be able to create data via an AppSync API. I've configured to use Cognito User Pool. But somehow if I want to create data via a mutation I get the error that I'm not authorized. The schema is described like this: type Advert @model @auth(rules: [{ allow: owner }, { allow: public, operations: [read] }]) { ... } But somehow this is not working. I just get following error: errorType: "Unauthorized", message: "Not Authorized to access createAdvert on type Advert"

However, if I try it via the AppSync Webconsole it is working. Must I configure something in the Amplify API Client?

Best regards Alex

  • Are you getting Unauthorized when testing locally using mock, or in the web-application when connecting to the API endpoint?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠