Requesting Authorization and a Temporary Token

orderingordering Posts: 9Member
Point: Requesting Authorization and a Temporary Token


When I hit this URL it ask for login 

I used this login credential:
PW: ordering

After login it shows the error:
{"error":"invalid_client","error_description":"The client id supplied is invalid"}

14 comments

  • Alex LugoAlex Lugo Posts: 132Administrator, Lightspeed Staff moderator
    Hello @Ordering,

    It seems you are using your Retail POS account id and not your OAuth Client id one, change it and you should be able to create your token.
    Alex Lugo
    API Support Specialist
    Lightspeed HQ
  • orderingordering Posts: 9Member
    Hi Alex Lugo,

    Thanks for taking the time to write to us.

    Yes you are right that I am using the "Account Id,(https://d.pr/i/skzW6b)

    Actually, I can not find out the "OAuth Client id", I have already shared my login credential with you. Will you please show me where should I get this "OAuth Client id" Otherwise you can tell me the path from where I can get this "OAuth Client id"?

    I will wait for your reply.

    Thank You
  • Adrian SamuelAdrian Samuel Posts: 477Moderator, Lightspeed Staff moderator
    @ordering the clientID you've passed into the URL that you use to authenticate the app for the account is wrong, you've put the accountID whereas our documentation specifies you'll need to use the one generated after you register your API client here: 

    https://cloud.lightspeedapp.com/oauth/register.php


    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • orderingordering Posts: 9Member
    Hi Adrian Samuel,

    According to your last instruction I was trying to generate the account Id but it shows me an error. The error message: (Error: Invalid URL: URL provided contains reserved Lightspeed trademarks or search engines.)

    This is my Website URL: https://plugins-development.ordering.co/paymentgateway/lightspeed/

    This is my Redirect URL: https://plugins-development.ordering.co/paymentgateway/lightspeed/success.php

    Please check it once let me know why I am facing such error.

    Thank You
  • Adrian SamuelAdrian Samuel Posts: 477Moderator, Lightspeed Staff moderator
    @ordering yes, please remove LightSpeed from your website and redirect url.

    Having LightSpeed in your name is not allowed.

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • orderingordering Posts: 9Member
    edited December 2018
    Hi Adrian Samuel,

    Thanks for you your kind help. I have submitted the form successfully, now I have to wait for the approval.


    Post edited by Adrian Samuel on
  • Adrian SamuelAdrian Samuel Posts: 477Moderator, Lightspeed Staff moderator
    @ordering,

    No worries! I have removed the picture containing your credentials since this should be private. You wouldn't want someone else to have access to control your app.

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • orderingordering Posts: 9Member
    Hi Adrian Samuel,

    Thanks for taking control over it. 
  • orderingordering Posts: 9Member
    Hi Adrian Samuel,

    Till I am waiting for the Client Id approval.

    Please check the screen: https://www.screencast.com/t/1fTAqPgJTlI

    Please let me know when this will be approved?

    Thanks
  • Alex LugoAlex Lugo Posts: 132Administrator, Lightspeed Staff moderator
    Hi @ordering,

    Your OAuth Client is already approved. Please let me know if you are facing any issues.

    Alex Lugo
    API Support Specialist
    Lightspeed HQ
  • orderingordering Posts: 9Member
    Hi Alex Lugo,

    Thanks for your confirmation.


    Here I cannot understand what should I pass in these two variables:

    code: The code you received after the user authorized your application.

    grant_type: Specify ‘authorization_code’ to get the access token.

    Where I will get this code and grant_type value? as it is described here "The code you received after the user authorized your application."


    Thanks

  • Adrian SamuelAdrian Samuel Posts: 477Moderator, Lightspeed Staff moderator
    Hey @ordering, the code is the temporary token that's sent to your redirect uri after the user authenticates your app

    The grant_type needs a string passed to it, as specified. So you'll put 
    'authorization_code' there

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • orderingordering Posts: 9Member
    Hi Adrian Samuel,

    Thank you so much.

    At last, I have got the success. I have generated all the keys successfully now I can access the API to fetch the category details information.

    Now I am going to integrate the LightSpeed system with our system, if I face any issue then I will ask you again.

    LightSpeed Technical Support Team is too good and helpful and cooperative.

    Thanks

Sign In or Register to comment.