%input is no valid ASIN. Please check the !link for messages.

Created on 3 July 2024, 9 months ago
Updated 19 July 2024, 9 months ago

Hello,

I installed this module on Drupal 10 version 2.1.0-beta16. However, when I try to test the module at /admin/config/services/amazon/test or add an ASIN field to a content type, I receive the error "%input is not a valid ASIN. Please check the !link for messages," even though the ASIN entered is valid.

I manually installed the amazon_sdk library from the link https://github.com/thewirecutter/paapi5-php-sdk, and replaced the access keys with my own, but the error persisted. I also tried installing this library from this comment https://www.drupal.org/project/amazon_pa/issues/3348917#comment-14982138 🐛 undefined function GuzzleHttp\_idn_uri_convert() Active and from Amazon's official site https://webservices.amazon.com/paapi5/documentation/quick-start/using-sd..., but all attempts were unsuccessful.

Could I get step-by-step assistance in installing this module?

Thank you!

💬 Support request
Status

Active

Version

2.1

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @l1fesxff
  • Hello again,

    I enabled API requests and received the following errors when sending a test request:

    Error: The request has not been correctly signed. If you are using an AWS SDK, requests are signed for you automatically; otherwise, go to this link.

    Error calling PA-API 5.0! [401] Client error: POST https://webservices.amazon.com/paapi5/getitems resulted in a 401 Unauthorized response: {"__type":"com.amazon.paapi5#InvalidSignatureException","Errors":[{"Code":"InvalidSignature","Message":"The request has (truncated...)

    Although the keys are correctly created, and I have installed the amazon_sdk library from this link: https://github.com/thewirecutter/paapi5-php-sdk. I also replaced all access, secret keys, and partner tags in the library.

    Thank you for your response.

  • 🇩🇪Germany marcoka

    Install the dev version please and test again. I use DEV in production.

  • Hello, thank you for the quick response.

    I installed the dev version of the module and encountered similar errors as in the previous comment.

    Here are the errors:

    Error calling PA-API 5.0! [401] Client error: POST https://webservices.amazon.com/paapi5/getitems resulted in a 401 Unauthorized response: {"__type":"com.amazon.paapi5#InvalidSignatureException","Errors":[{"Code":"InvalidSignature","Message":"The request has (truncated...)

    Error: The request has not been correctly signed. If you are using an AWS SDK, requests are signed for you automatically; otherwise, go to this link.

    User warning: Invalid placeholder (!link) with string: "%input is no valid ASIN. Please check the !link for messages." in Drupal\Component\Render\FormattableMarkup::placeholderFormat() (line 246 of /var/www/web/core/lib/Drupal/Component/Render/FormattableMarkup.php).

    I would appreciate your help.

    Thank you!

  • 🇩🇪Germany marcoka

    Ok actually i have no idea because i run the dev with the SDK from wirecutter.

  • Hello!

    I installed the library from wirecutter https://github.com/thewirecutter/paapi5-php-sdk, but the errors from the top comment remained

    Ways to reproduce:
    1. Install the module and add the credentials in the configurations
    2. Installed the library from https://github.com/thewirecutter/paapi5-php-sdk, renamed it to amazon_sdk, and replaced the credentials in the library

Production build 0.71.5 2024