Erros de autorização

Descreve códigos de erro comuns e mensagens relacionadas à autorização da SP-API.

A autorização do aplicativo é necessária para a integração com a API do parceiro de vendas. Durante esse processo, você pode encontrar códigos de erro e mensagens de erro. As dicas de solução de problemas a seguir podem ajudar você caso se depare com erros durante o processo.

For additional guidance, refer to the SP-API Errors FAQ.

Códigos de erro

A tabela a seguir fornece códigos de erro comuns que você pode encontrar com a autorização do aplicativo.

Código de erroCausaEtapas para resolver
MD1000

Este erro retorna quando o fluxo de trabalho de produção do OAuth está autorizando um aplicativo da SP-API que está em estado de rascunho.

Adicione o parâmetro version=beta para o URI de autorização do OAuth:

https://sellercentral.amazon.com/apps/authorize/consent?application_id=appidexample&state=stateexample&version=beta

Depois que seu aplicativo for publicado, você poderá remover o parâmetro version=beta.

MD5101Este erro retorna quando o URL de redirecionamento fornecido durante a autorização do OAuth não corresponde a um dos URLs de redirecionamento listados para o aplicativo da SP-API.Verify that you are using the correct redirect URL.
In Seller Central:
From the Seller Central menu, choose Apps and Services, then choose Develop Apps. Choose Edit App next to the app you'd like to verify. Verify the OAuth Redirect URI listed in the console and the redirect URL of the page where you received the error match. If the URLs do not match, add the redirect URL to the console. If you are using the published version of your app, make sure you publish the update.
MD5110This error returns when the URL Redirect contains fragments.
For more details, refer to section 3.1.2 of the OAuth 2.0 Authorization Framework.
Check the redirect URL for fragments. In Seller Central:
From the Seller Central menu, choose Apps and Services, then choose Develop Apps. Choose Edit App next to the app you'd like to verify. Verify the redirect URL is valid syntactically and does not contain fragment characters such as #.
MD9100Este erro retorna quando seu aplicativo da SP-API não tem informações de URI de login e de URI de redirecionamento. Update your app Login URI and Redirect URI. In Seller Central:
From the Seller Central menu, choose Apps and Services, then choose Develop Apps. Choose Edit App next to the app you'd like to verify. Update the OAuth Login URI and OAuth Redirect URI details.
500Este erro retorna devido a erros no cabeçalho. Verifique se o cabeçalho Content-Type está definido como application/x-www-form-urlencoded e os parâmetros da solicitação foram adicionados ao corpo, e não como parâmetros de consulta.

Mensagens de erro

A tabela a seguir apresenta mensagens de erro comuns que podem aparecer com a autorização do aplicativo.

Mensagem de erroCenários possíveis
Credential should be scoped to a valid regionIn the signature, make sure that the AWS Region you added to the credentials scope and the region of the endpoint you are sending the request match. Refer to Selling Partner API Endpoints to identify which AWS Region you should use for your respective selling region.
Access to requested resource is deniedAs mensagens de erro de acesso negado são retornadas devido a erros Unauthorized ou erros MissingAuthenticationToken.
UnauthorizedAn Unauthorized with status code 403 error returns for the following scenarios:
- Region mismatch: Ensure that the seller account you are making a request to and the request endpoint are in the same region. The Selling Partner application is global but seller accounts are not. Refer to SP-API Endpoints for more information.
- API access: Ensure that your application has access to the API operation you are using. To verify role permissions in Solution Provider Portal, choose Edit App next to the app you'd like to verify and review the roles selected for your application. - Missing SP-API Role: If you are missing the role you need for API access, check your Developer Profile to verify you have requested access to that role. If you are missing access to a restricted role, you might need to re-submit your Developer Profile to get access to that restricted role. After the role is added, re-authorize your application (that is, generate a new Login With Amazon (LWA) refresh token to make valid API calls). For more information, refer to Frequently Asked Questions in Roles in the Selling Partner API.
MissingAuthenticationTokenAs Selling Partner API uses the AWS Signature Version 4 signing process for authenticating requests, make sure to sign the HTTP requests using your AWS access keys. If you used AWS STS to request a set of temporary AWS access keys to sign your requests, verify that you are using the requested temporary AWS keys. For additional resources, refer to the AWS Selling Partner API QuickStart and example code.

Esta página ajudou você?