Glue API access-token and token endpoints

vaisakhpc
vaisakhpc Senior Developer Posts: 3 🧑🏻‍🚀 - Cadet

Hello all, I've been looking into the API specs of Spryker and I found that there are two types of toek requesting endpoints, one is '{{baseUrl}}/access-tokens' and another one is '{{baseUrl}}/token'. I couldn't make the latter work as well, tried a few options for passing the arguments and headers, but no luck. I would like to know about these two, things like which to use when. I've noticed that in some docs pages ( Like this, https://docs.spryker.com/docs/pbc/all/data-exchange/202404.0/sending-requests-with-data-exchange-api.html#prerequisites ), I can see the reference to "/token" endpoint. I would really appreciate if anyone from spryker could clear the air here for me

Best Answer

  • profuel
    profuel SSA Sprykee Posts: 82 🪐 - Explorer
    edited July 22 Answer ✓

    Hi!

    Spryker provides API endpoints for customers and users.

    Customers, using Glue API, have to use /access-tokens endpoint with storefront domain (see application glue ).

    Users, using DataExchange API or Backend Glue API or Storefront Glue API, have to use /token endpoint with the corresponding domain (see application glue-backend or glue-storefront)

    Please check this documentation: https://docs.spryker.com/docs/dg/dev/glue-api/202404.0/decoupled-glue-api.html

    I hope this helps.

Answers

  • profuel
    profuel SSA Sprykee Posts: 82 🪐 - Explorer
    edited July 22 Answer ✓

    Hi!

    Spryker provides API endpoints for customers and users.

    Customers, using Glue API, have to use /access-tokens endpoint with storefront domain (see application glue ).

    Users, using DataExchange API or Backend Glue API or Storefront Glue API, have to use /token endpoint with the corresponding domain (see application glue-backend or glue-storefront)

    Please check this documentation: https://docs.spryker.com/docs/dg/dev/glue-api/202404.0/decoupled-glue-api.html

    I hope this helps.