What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hii Team , I am using glue api using postman with the d

U04UE6DF06N
U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

Hii Team ,
I am using glue api using postman http://glue.de.spryker.local/access-tokens
with the data {
"data": {
"type": "access-tokens",
"attributes": {
"username": "<mailto:sonia1@spryker.com|sonia1@spryker.com>",
"password": "change123"
}
}
}

Its give me error
{
"errors": [
{
"code": "003",
"status": 401,
"detail": "Failed to authenticate user."
}
]
}

But i can login from the same credential on storfront

Comments

  • U04FXCTCWPP
    U04FXCTCWPP Posts: 91 πŸ§‘πŸ»β€πŸš€ - Cadet

    Just a guess: seeing how you're using type "access-tokens", aren't you missing a token or suchlike from "attributes"?

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    can not understand what are you saying

  • U04FXCTCWPP
    U04FXCTCWPP Posts: 91 πŸ§‘πŸ»β€πŸš€ - Cadet

    You use this:

    {
      "data": {
        "type": "access-tokens",
        "attributes": {
          "username": "<mailto:sonia1@spryker.com|sonia1@spryker.com>",
          "password": "change123"
        }
      }
    }
    

    But shouldn't you also have:

    with the data {
      "data": {
        "type": "access-tokens",
        "attributes": {
          "username": "<mailto:sonia1@spryker.com|sonia1@spryker.com>",
          "password": "change123",
          "token": "sometokenvalue",
        }
      }
    }
    

    ?

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    i am using the same

    {
      "data": {
        "type": "access-tokens",
        "attributes": {
          "username": "<mailto:sonia1@spryker.com|sonia1@spryker.com>",
          "password": "change123"
        }
      }
    }
    

    but then also give the error

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    there is only one end point to login as a customer through glue API or we can have more as well , like 'access-tokens' can we have more endpoint to access the customer login

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    can you please guide me what can be the error

  • U04FXCTCWPP
    U04FXCTCWPP Posts: 91 πŸ§‘πŸ»β€πŸš€ - Cadet

    I was just guessing, sorry - I haven't used this part of Spryker yet.

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok thanks

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet
  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet

    Is this happening on dev environment?

    If so, you might have an issue with oauth client credentials (might have happened if you tried running docker/sdk boot without DB reset). You can try that

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes it is in dev environment

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hey , i done that thing and as i run docker/sdk up it shows error and stop


    [application-production-codebase 8/9] RUN vendor/bin/install -r docker -s build -s build-production -vvv:

    18 1.201

    18 1.201 Fatal error: Uncaught Spryker\Shared\Kernel\CodeBucket\Exception\InvalidCodeBucketException: CodeBucket "INDIA" is not a valid option! in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/CodeBucket/Config/AbstractCodeBucketConfig.php:50

    18 1.201 Stack trace:

    18 1.201 #0 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/CodeBucket/Config/AbstractCodeBucketConfig.php(30): Spryker\Shared\Kernel\CodeBucket\Config\AbstractCodeBucketConfig->assertCodeBucket('INDIA')

    18 1.201 #1 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/CodeBucket/Config/CodeBucketConfig.php(40): Spryker\Shared\Kernel\CodeBucket\Config\AbstractCodeBucketConfig->getCurrentCodeBucket()

    18 1.201 #2 /data/vendor/spryker/config/src/Spryker/Shared/Config/Application/Environment.php(93): Spryker\Shared\Kernel\CodeBucket\Config\CodeBucketConfig->getCurrentCodeBucket()

    18 1.201 #3 /data/vendor/spryker/config/src/Spryker/Shared/Config/Application/Environment.php(25): Spryker\Shared\Config\Application\Environment::defineCodeBucket()

    18 1.201 #4 /data/vendor/spryker/install/bin/install(28): Spryker\Shared\Config\Application\Environment::initialize()

    18 1.201 #5 /data/vendor/bin/install(120): include('/data/vendor/sp...')

    18 1.201 #6

    18 1.201 thrown in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/CodeBucket/Config/AbstractCodeBucketConfig.php on line 50

    18 1.201 [28-Mar-2023 04:53:07 UTC] PHP Fatal error: Uncaught Spryker\Shared\Kernel\CodeBucket\Exception\InvalidCodeBucketException: CodeBucket "INDIA" is not a valid option! in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/CodeBucket/Config/AbstractCodeBucketConfig.php:50

    18 1.201 Stack trace:

    18 1.201 #0 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/CodeBucket/Config/AbstractCodeBucketConfig.php(30): Spryker\Shared\Kernel\CodeBucket\Config\AbstractCodeBucketConfig->assertCodeBucket('INDIA')

    18 1.201 #1 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/CodeBucket/Config/CodeBucketConfig.php(40): Spryker\Shared\Kernel\CodeBucket\Config\AbstractCodeBucketConfig->getCurrentCodeBucket()

    18 1.201 #2 /data/vendor/spryker/config/src/Spryker/Shared/Config/Application/Environment.php(93): Spryker\Shared\Kernel\CodeBucket\Config\CodeBucketConfig->getCurrentCodeBucket()

    18 1.201 #3 /data/vendor/spryker/config/src/Spryker/Shared/Config/Application/Environment.php(25): Spryker\Shared\Config\Application\Environment::defineCodeBucket()

    18 1.201 #4 /data/vendor/spryker/install/bin/install(28): Spryker\Shared\Config\Application\Environment::initialize()

    18 1.201 #5 /data/vendor/bin/install(120): include('/data/vendor/sp...')

    18 1.201 #6

    #18 1.201 thrown in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/CodeBucket/Config/AbstractCodeBucketConfig.php on line 50

    executor failed running [/bin/sh -c vendor/bin/install -r ${SPRYKER_PIPELINE} -s build -s build-production -vvv]: exit code: 255

  • U04UE6DF06N
    U04UE6DF06N Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    hey @UQKSAARKN i have run that command but the issue is still remain can you please suggest me better option