API call for attachment download => "missing, malformed, expired or otherwise invalid token provided" #192

Closed
opened 2026-02-27 14:55:22 -05:00 by deekerman · 7 comments
Owner

Originally created by @ozuzo on GitHub (Feb 2, 2024).

Description

I think I've assigned all roles to an API token in Vikunja, and are able to extract projects, tasks, etc from the API. But when trying to recreate download links for attachments, I get

[message] => missing, malformed, expired or otherwise invalid token provided

for the /tasks/XX/attachments/YY call, instead of the contents of the attachment

Are tokens supposed to work for this call as well?

Vikunja Frontend Version

0.22.1

Vikunja API Version

0.22.1

Browser and version

n/a

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

Originally created by @ozuzo on GitHub (Feb 2, 2024). ### Description I think I've assigned all roles to an API token in Vikunja, and are able to extract projects, tasks, etc from the API. But when trying to recreate download links for attachments, I get `[message] => missing, malformed, expired or otherwise invalid token provided ` for the `/tasks/XX/attachments/YY` call, instead of the contents of the attachment Are tokens supposed to work for this call as well? ### Vikunja Frontend Version 0.22.1 ### Vikunja API Version 0.22.1 ### Browser and version n/a ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
deekerman 2026-02-27 14:55:22 -05:00
Author
Owner

@kolaente commented on GitHub (Feb 5, 2024):

Looks like attachment upload and download are not included in the available token scopes.

@kolaente commented on GitHub (Feb 5, 2024): Looks like attachment upload and download are not included in the available token scopes.
Author
Owner

@kolaente commented on GitHub (Feb 14, 2024):

Now implemented in 415c6380a5, please check with the next unstable build (should be ready for deployment in ~45min, also on try).

Note that you need to recreate any tokens you were previously using for this.

@kolaente commented on GitHub (Feb 14, 2024): Now implemented in 415c6380a52fa15d1765cd3d4915bc0e76b1349a, please check with the next unstable build (should be ready for deployment in ~45min, also on [try](https://try.vikunja.io)). Note that you need to recreate any tokens you were previously using for this.
Author
Owner

@ozuzo commented on GitHub (Feb 14, 2024):

Thanks - this seems to work now in my reporting tool :-)

@ozuzo commented on GitHub (Feb 14, 2024): Thanks - this seems to work now in my reporting tool :-)
Author
Owner

@kolaente commented on GitHub (Feb 14, 2024):

I'm a little curious, how are you using the api?

@kolaente commented on GitHub (Feb 14, 2024): I'm a little curious, how are you using the api?
Author
Owner

@ozuzo commented on GitHub (Feb 14, 2024):

I'm running Vikunja to support a small group of not-very-technical board members of a committee - so we have a central location for ongoing tasks, keeping track of related documents etc (in the past this was usually done only in the minutes of meetings, quite ineffecient). Two issues: te GUI is for some of them already a bit challenging, and it was a bit difficult tracking any changes since our last board meeting (specifically: added comments).

So I've written a small PHP script to generate an overview of all open tasks, with all comments and attachments, highlighting any comments made within the last four weeks (the usual interval between meetings). That way we have a nice summary of what to discuss, and everybody can easily prepare...

@ozuzo commented on GitHub (Feb 14, 2024): I'm running Vikunja to support a small group of not-very-technical board members of a committee - so we have a central location for ongoing tasks, keeping track of related documents etc (in the past this was usually done only in the minutes of meetings, quite ineffecient). Two issues: te GUI is for some of them already a bit challenging, and it was a bit difficult tracking any changes since our last board meeting (specifically: added comments). So I've written a small PHP script to generate an overview of all open tasks, with all comments and attachments, highlighting any comments made within the last four weeks (the usual interval between meetings). That way we have a nice summary of what to discuss, and everybody can easily prepare...
Author
Owner

@ozuzo commented on GitHub (Feb 14, 2024):

Looks like:

image

@ozuzo commented on GitHub (Feb 14, 2024): Looks like: ![image](https://github.com/go-vikunja/vikunja/assets/5175516/acd9a6cf-0514-461c-b8e7-a04590a749e3)
Author
Owner

@kolaente commented on GitHub (Feb 14, 2024):

Very nice, thanks for the insight!

@kolaente commented on GitHub (Feb 14, 2024): Very nice, thanks for the insight!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vikunja-go-vikunja#192
No description provided.