Can't access resource with the oauth2 token I c reated

  • 14 August 2023
  • 3 replies
  • 36 views

I have successully followed the documentation to create my oath2 token but when I go to test it I get:

        <h1>Not Found</h1>

        <p id="detail">
            For request 'GET /publicapi/oauth2/user'
        </p>

My command is:

curl https://api.lucid.co/oauth2/user --request GET --header "Authorization: Bearer oauth2-<redacted token>"

I have gone back to create my token a few times and tried a few different tests per the documentation.  I always get the above error back.

  Thanks.

Kevin J. Conway

 


Comments

Userlevel 4
Badge +7

I'm glad to hear that! Please don't hesitate to reach out if anything else comes up.

HI:

  I found I needed to add some scopes for things to work properly as well as go back again check that I had the right URL for what was needed.  I was able to connect to the API list the documents in my account and download selected ones as PNG files.

  Thanks for the assist.

Kevin

Userlevel 4
Badge +7

Hi Kevin

Thank you for contributing to the Lucid for Developers Community!

Can you try testing your OAuth token with a different endpoint such as Get Profile? Please ensure that your OAuth token has the user.profile scope. Then update your request URL and add the 'Lucid-Api-Version: 1' header as shown below:

curl 'https://api.lucid.co/users/me/profile'  
--request 'GET'
--header 'Authorization: Bearer <OAuth 2.0 Access Token>'
--header 'Lucid-Api-Version: 1'

Let us know how it goes!

Reply