Shop token usage

stsygankovstsygankov Posts: 2Member

I'm developing an app for PSP integration. When I install my app to the test wepshop, I receive a signature and a token in the GET request to the Success URL, however it's not clear what to do with this token.

I would like to perform the following actions:

1) retrieve ShopCompany resource for the test web-shop;

2) add External Service to the test web-shop.

I already tried:

1) to send the token in the Authorization header (Bearer);

2) to send the request with appkey and appsecret in the Authorization header (Basic)

I checked all eCom API documentation and haven't found any document describing how to use the token.

Please help.

3 comments

  • Alex LugoAlex Lugo Posts: 138Administrator, Lightspeed Staff moderator

    Hello @stsygankov,

    You will find a code example that explains what to do with the token and how to use it in order to get access to the shop data.

    https://developers.lightspeedhq.com/ecom/tutorials/installing-an-app/

    Alex Lugo
    API Support Specialist
    Lightspeed HQ
  • stsygankovstsygankov Posts: 2Member

    Hi Alex,

    Thanks a lot for the prompt response!

    For some reason I missed the "Making calls with the API" PHP example, may be because I expected to see this information in the "Authentication and authorization" section. I had no problems installing the app to the test web-shop and it was absolutely clear how to perform signature validation, but I couldn't find this extremely important block of code, probably because it's rendered at the bottom of the page and you have to scroll down to see it.

    It seems that this question is quite similar to mine: https://community.lightspeedhq.com/en/discussion/1874/api-token-no-key

    , so may be you can post the same answer there.

    Thanks a lot again!

    /Stan

  • Alex LugoAlex Lugo Posts: 138Administrator, Lightspeed Staff moderator

    Hi Stan,

    You're right, the code sample isn't in the best place, we will try to make it more clear.

    Alex Lugo
    API Support Specialist
    Lightspeed HQ
Sign In or Register to comment.