Forum Discussion

bongsakorn's avatar
6 years ago

SSO Token does not work

Hello, 

I try to generate SSO token via php library. I already got token but it doesn't work.

But I tried to get lithiumSSO from cookie by inspect browser and try to get session key via API. It's work.

How different between these token? Why I cannot use token from library ? What am wrong?

 

 

Thank you in advanced.

    • bongsakorn's avatar
      bongsakorn
      Guide

      Parshant 

      I tried but in get access token step I don't get any response from server. I do follow step below.

       

      1.  I already created API Apps.
      2. At the chrome browser, I put this url to get code
        https://my_community.com/auth/oauth2/authorize?client_id=[CLIENT ID]&response_type=code&redirect_uri=http:/my_community.com
      3. After I got the code, I get access token at the terminal like:
        curl -X POST \
          https://my_community.com/auth/oauth2/accessToken \
          -H 'Cache-Control: no-cache' \
          -H 'Content-Type: application/json' \
          -H 'client_id: [CLIENT_ID]' \
          -d '{
          "client_id":"[CLIENT_ID]",
          "client_secret":"[CLIENT_SECRET]",
          "grant_type":"authorization_code",
          "redirect_uri":"https://my_community.com/",
          "code":"[CODE]"
        }'
      4.  I get nothing. :(