Backend API invalid_client error when try to get token

rafal.konczewski
rafal.konczewski Spryker Solution Partner Posts: 4 🧑🏻‍🚀 - Cadet
edited March 17 in Spryker Development

Hi,
I've just follow with doc https://docs.spryker.com/docs/pbc/all/identity-access-management/202311.0/manage-using-glue-api/glue-api-authenticate-as-a-back-office-user.html#authenticate-as-a-back-office-user to get access token as a backoffice user.

Body: x-www-form-urlencoded:
grant_type=password
username=admin@spryker.com
password=change123

POST https://glue-backend.de.spryker.local/token/


I get response:
[    {        "code": "invalid_client",        "status": 400,        "message": "Client authentication failed"    }].


B2B Marketplace 202311.0.

Tagged:

Answers

  • rafal.konczewski
    rafal.konczewski Spryker Solution Partner Posts: 4 🧑🏻‍🚀 - Cadet

    Small update, now i get response:
    [    {        "code": "invalid_grant",        "status": 400,        "message": "The user credentials were incorrect."    }]

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 84 🏛 - Council (mod)
    edited March 18

    I just tried it in my local env and it works:

    POST http://glue-backend.de.spryker.local/token

    Content-Type: application/x-www-form-urlencoded
    
    Accept: application/json
    
    username = admin@spryker.com &
    
    password = change123 &
    
    grant_type = password
    

  • rafal.konczewski
    rafal.konczewski Spryker Solution Partner Posts: 4 🧑🏻‍🚀 - Cadet

    Hi, thank you for an answer. Another docker reset solved my problem.