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?

Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas