Coder Social home page Coder Social logo

Comments (2)

amz-tools avatar amz-tools commented on August 23, 2024

Hi @Javadebi,

thats an issue we know about, but we didn't find the time to fix it yet. This happens when either the security_token you provide is wrong or if the security_token is very old. An old token should usually return an "expired" error, which will result in requesting a new one, but somehow Amazon returns an "invalid" error if it is very old, i.e. a couple weeks or so, which currently results in throwing an error instead of requesting a new one.
Until we release a fix you could trigger a new token manually by calling refreshRoleCredentials() manually or by just not passing in a security_token when creating the instance.

from amazon-sp-api.

zirkelc avatar zirkelc commented on August 23, 2024

I this issue still open? We get the following error:

{
    "errorType": "Error",
    "errorMessage": "The security token included in the request is invalid.",
    "code": "InvalidClientTokenId",
    "message": "The security token included in the request is invalid.",
    "type": "error",
    "stack": [
        "Error: The security token included in the request is invalid.",
        "    at SellingPartner.refreshRoleCredentials (/node_modules/amazon-sp-api/lib/SellingPartner.js:485:13)",
        "    at processTicksAndRejections (internal/process/task_queues.js:95:5)",
        "    at SellingPartner._validateAccessTokenAndRoleCredentials (/node_modules/amazon-sp-api/lib/SellingPartner.js:255:9)",
        "    at SellingPartner.callAPI (/node_modules/amazon-sp-api/lib/SellingPartner.js:535:5)",
        "    at Runtime.handle (/src/handlers/getData.ts:33:16)"
    ]
}

from amazon-sp-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.