Skip to main content
Feb 10, 2025 4:09 PM UTC
Solved

My first API call - all keys are 'view only' - 403 response

I have followed the instructions here
https://lucid.readme.io/reference/obtaining-an-access-token
and here
https://lucid.readme.io/docs/api-keys

 

but it is not working.  I keep geting a 403 unauthorized error.  There is also something on the apikey page saying ‘view only’.  This ‘view only’ is not mentioned in any instructions.  I have tried searching for this ‘view only’ issue but have not found any matches.  

Ps. I can read using the API, but cannot write/create.

Anyone have any ideas?

 

 

Michael B
Michael BAnswer
Lucid product team
Feb 10, 2025 8:02 PM UTC

I think I figured it out. The `parent` field corresponds to which folder you want the document to be created in, but you do not have write access to `folderId 1234` (or it doesn’t exist). Remove that parameter or change it to a folder on your account.

 

I notice the domain is `api.lucid.app`. I believe that works, but technically should be `api.lucid.co`.  Is that taken directly from our tutorial, or did you type it manually? (Just in case we need to update something somewhere).

Comments

Michael B
Lucid product team
Feb 10, 2025 5:51 PM UTC

Hello johntejik,

 

The `view only` you are seeing on the API Key details page is intended to indicate that the permissions of the key can not be modified once the key is created.

 

In that screenshot we can see that the key has `write` permissions for documents and folders. If you can provide the request the you are making which is unexpectedly returning a 403, we may be able to help identify why.

Translate
Feb 10, 2025 7:54 PM UTC

I am using the example request in the tutorial

curl --request POST \
  --url https://api.lucid.app/documents \
  --header 'accept: application/json' \
  --header 'authorization: Bearer key-<masked>' \
  --header 'content-type: application/json' \
  --header 'lucid-api-version: 1' \
  --data ' {
          "title": "Created Document",
          "product": "lucidchart",
          "parent": 1234
        }'

Translate
Michael B
Michael BAnswer
Lucid product team
Feb 10, 2025 8:02 PM UTC

I think I figured it out. The `parent` field corresponds to which folder you want the document to be created in, but you do not have write access to `folderId 1234` (or it doesn’t exist). Remove that parameter or change it to a folder on your account.

 

I notice the domain is `api.lucid.app`. I believe that works, but technically should be `api.lucid.co`.  Is that taken directly from our tutorial, or did you type it manually? (Just in case we need to update something somewhere).

Translate
Feb 10, 2025 8:22 PM UTC
Michael B
Lucid product team
Feb 10, 2025 8:25 PM UTC

Thanks, I’l get this updated to have the correct domain and not include the optional parent parameter.

Translate
Feb 10, 2025 9:24 PM UTC

I have tried setting the parent folder to be my main folder, same results
 

 

Translate
Feb 10, 2025 9:25 PM UTC

removing the ‘parent’ parameter worked.  Thank you!

Translate
Feb 12, 2025 7:30 PM UTC

I also suggest moving that ‘view only’ to somewhere other than right next to ‘grants’, or better yet, remove it completely.  If there’s no ‘edit’ button, users assume its view only.

 

Translate