Reputation: 17010
I'm using the Notion API Beta, reading pages from a table that has a "Files & media" property I'm interested in. The API response just gives me the names of the files uploaded there, but I don't have a URL to actually access them. What am I missing? Thanks.
{
"Photo": {
"id": "xxxx",
"type": "files",
"files": [
{
"name": "000150748673-ofnuhb-t500x500.jpg"
}
]
}
}
Update: see answer.
Upvotes: 7
Views: 4100
Reputation: 17010
The API has been updated and it now provides a temporary authenticated URL to files uploaded in Notion. For example:
{
"Photo": {
"id": "xxxx",
"type": "files",
"files": [
{
"name": "000150748673-ofnuhb-t500x500.jpg",
"type": "file",
"file": {
"url": "https://s3.us-west-2.amazonaws.com/...",
"expiry_time": "2021-09-22T09:00:56.029Z"
}
}
]
}
}
Upvotes: 5
Reputation: 4417
The Notion API currently does not support file uploads or downloads (Notion-Version: 2021-05-13). It does not return a URL to the stored file.
Upvotes: 4