Erreurs d'autorisation
Décrit les codes d'erreur et les messages courants liés à l'autorisation SP-API.
L'autorisation de l'application est requise pour l'intégration à l'API partenaire de vente. Au cours de ce processus, vous pouvez rencontrer des codes et messages d'erreur. Les conseils de dépannage suivants peuvent vous aider à les résoudre.
For additional guidance, refer to the SP-API Errors FAQ.
Codes d'erreur
Le tableau suivant présente les codes d'erreur courants que vous pouvez rencontrer lors de l'autorisation d'une application.
Code d'erreur | Cause | Étapes à suivre pour résoudre le problème |
---|---|---|
MD1000 | Cette erreur est renvoyée lorsque le workflow de production OAuth autorise une application SP-API au statut Brouillon. | Ajoutez le paramètre
Une fois votre application publiée, vous pouvez supprimer le paramètre
|
MD5101 | Cette erreur est renvoyée lorsque l'URL de redirection fournie lors de l'autorisation OAuth ne correspond pas à l'une des URL de redirection répertoriées pour l'application 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. |
MD5110 | This 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 # . |
MD9100 | Cette erreur est renvoyée lorsqu'il manque des informations sur l'URI de connexion et l'URI de redirection dans votre application SP-API. | 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. |
500 | Cette erreur est renvoyée en raison d'erreurs dans l'en-tête. | Vérifiez que l'en-tête Content-Type est défini sur application/x-www-form-urlencoded et que les paramètres de requête sont ajoutés au corps et non en tant que paramètres de requête. |
Messages d'erreur
Le tableau suivant présente les messages d'erreur courants que vous pouvez rencontrer lors de l'autorisation d'une application.
Message d'erreur | Scénarios possibles |
---|---|
Credential should be scoped to a valid region | In 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 denied | Les messages d'erreur Accès refusé sont renvoyés en présence d'erreurs Unauthorized ou MissingAuthenticationToken . |
Unauthorized | An 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. |
MissingAuthenticationToken | As 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. |
Updated 23 days ago