Title: Cannot connect to API
Last modified: November 27, 2018

---

# Cannot connect to API

 *  Resolved [lolotutu](https://wordpress.org/support/users/lolotutu/)
 * (@lolotutu)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/)
 * Hi,
    When I try to connect to the API, I get the message : “Failed authentication.
   Error: InvalidClientTokenId: The AWS Access Key Id you provided does not exist
   in our records. Locale: FR Domain: webservices.amazon.fr” I specify that : 1)
   My access key/access ID work fine with scratchpad 2) They also workfine with 
   the plugin “WooCommerce Amazon Affiliates” 3) They also workfine with the plugin“
   Amazon Product in a Post” I also disconnected all my plugin except amazon auto
   links Clear plugin cache Still doesn’t work
 *  Thanks for your help
 * Laurent turbin
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcannot-connect-to-api-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10922682)
 * Hi,
 * You can test whether your keys are valid using [ScratchPad](https://webservices.amazon.com/scratchpad/index.html).
   Try these steps.
 * 1. Go to Scratchpad ([https://webservices.amazon.com/scratchpad/index.html](https://webservices.amazon.com/scratchpad/index.html)).
   
   2. From the left sidebar, navigate to “Select operation” -> “SEARCH” -> “ItemSearch”
   3. Fill the form. a) In the “Common parameters” section, fill the followings,–
   Marketplace: `webservices.amazon.<your locale>` – Associate Tag: your associate
   tag issued by Amazon Associates – Access Key ID: the one issued by Amazon Associates–
   Secret Access Key: the one issued by Amazon Associates b) In the “Request parameters”
   section, fill the followings, – Searchindex: All – Keywords: WordPress – ResponseGroup:
   Images, ItemAttributes, Offers (keep this untouched) 4. Press the “Run request”
   button.
 * If successful, products should be listed at the bottom part of the page. Let 
   me know what you get.
 *  Thread Starter [lolotutu](https://wordpress.org/support/users/lolotutu/)
 * (@lolotutu)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10923202)
 * Hi,
    Thanks for your answer I did again the test you told me with scratchpad 
   => success But as I told you in my post, 1) My access key/access ID work fine
   with scratchpad And they also work fine with plugin AAWP, WooCommerce Amazon 
   Affiliates and Amazon Product in a Post …
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10923239)
 * Oh, I missed that you have already tried ScratchPad, sorry.
 * Can you try clearing plugin caches by going to Dashboard -> Amazon Auto Links-
   > Settings -> Cache -> Caches -> Clear All Caches?
 * Let me know if that works or not.
 *  Thread Starter [lolotutu](https://wordpress.org/support/users/lolotutu/)
 * (@lolotutu)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10931134)
 * Hi,
    I also already cleared caches Please read carefully my first post 🙂 Still
   cannot connect to API …
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10932122)
 * Ops. Sorry again.
 * I suspect you are trying to connect the FR server with the access keys created
   with a different locale.
 * In the `Authentication` setting page, can you try the different locales in the`
   Server Locale` option? I assume you are selecting `FR` now. Try with `US` and
   so on and see what happens. Try with all of them until it succeeds. And post 
   the error messages for all the locales you try as they can help detecting the
   cause.
 *  Thread Starter [lolotutu](https://wordpress.org/support/users/lolotutu/)
 * (@lolotutu)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10936423)
 * Hi,
    Thanks for you help. I performed the connection test and this is what I 
   get :
 * 1 )I can connect to webservices.amazon.cn 🙂
 * 2) For french domain .FR, I get this msg :
    “Failed authentication. Error: InvalidClientTokenId:
   The AWS Access Key Id you provided does not exist in our records. Locale: FR 
   Domain: webservices.amazon.fr”
 * 3) For all others domain , I get htis message :
    “Failed authentication. Error:
   AWS.InvalidAssociate: Your XXXXXXXXXXXXX is not registered as an Amazon Associate.
   Please register as an associate at [https://associates.amazon.ca/assoc_credentials/home](https://associates.amazon.ca/assoc_credentials/home).
   Locale: XX Domain: webservices.amazon.XX”
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10936537)
 * Okay,
 * So it means that you created keys with the Chinese account. Are you sure ScratchPad
   gave you the same error? I suggest you check what happens if you change the locale
   on ScratchPad.
 * Most likely you need to create access keys with the French account if you want
   to display products from the French server. You should be able to create keys
   from the Amazon Associates account page ([https://partenaires.amazon.fr/](https://partenaires.amazon.fr/)).
   By the way, it used to be only possible to issue API keys from the AWS account
   page before. Also, it used to be possible to fetch products of foreign locales
   with a single pair of keys but Amazon seems to have changed their rules not to
   allow it.
 *  Thread Starter [lolotutu](https://wordpress.org/support/users/lolotutu/)
 * (@lolotutu)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10937992)
 * Why would I create from chinese account ? I dont speak chinese 🙂 and I dont 
   sell to chinese people.
    No, no, no I have created my credentials using french
   server. It was almost one year ago. And as I told you in my first post(please,
   read it carefully), these keys work fine with plugin “WooCommerce Amazon Affiliates”
   and “Amazon Product in a Post”, using french server. These plugin are direct 
   competitor to you. So why do these keys work fine with them and not with your
   plugin ?
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10938196)
 * Hmm,
 * Did you set your Associate ID in the Authentication page? If not, try setting
   it and see if it makes any difference. If you don’t find the input field, update
   the plugin to the latest.
 * Also tell me the plugin version.
 * If you want me to test your keys on my end, I’d be happy to do that. In that 
   case, shoot me an email from the [contact page](http://en.michaeluno.jp/contact/).
 *  Thread Starter [lolotutu](https://wordpress.org/support/users/lolotutu/)
 * (@lolotutu)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10938841)
 * Hello
    That’s it! The connection to the French server has been done since this
   morning (without changing anything on my side since yesterday). The Mysteries
   of computer science 😉 Thank you for your patience and your help
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10939887)
 * That is strange.
 * Anyway, glad to hear the keys are working.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Cannot connect to API’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/amazon-auto-links_eeeeee.svg)
 * [Auto Amazon Links - Amazon Associates Affiliate Plugin](https://wordpress.org/plugins/amazon-auto-links/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-auto-links/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-auto-links/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-auto-links/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-auto-links/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-auto-links/reviews/)

## Tags

 * [amazon](https://wordpress.org/support/topic-tag/amazon/)

 * 11 replies
 * 2 participants
 * Last reply from: [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-connect-to-api-2/#post-10939887)
 * Status: resolved