Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access the Homarr API #2069

Closed
4 tasks done
mSarheed opened this issue Jun 10, 2024 · 7 comments
Closed
4 tasks done

Can't access the Homarr API #2069

mSarheed opened this issue Jun 10, 2024 · 7 comments
Assignees
Labels
🐛 Bug Something isn't working Stale
Milestone

Comments

@mSarheed
Copy link

Environment

Cloud Service (Static)

Version

0.15.3

Describe the problem

My Homarr instance is running on the Home Assistant Add-on. I'm trying to use the Homarr API to ping certain apps or dashboards, but I keep getting unauthorized (I'm using the personal access token as bearer key from the Homarr Dashboard).

curl -H "Authorization: Bearer personal-access-token-here" http://192.168.1.5:7575/api/boards/all {"message":"UNAUTHORIZED","code":"UNAUTHORIZED"}%

I have tried various endpoints from the swagger interface, but that just shows "TypeError: Load Failed"

Logs

No response

Context

SCR-20240610-thld

Please tick the boxes

  • I confirm that I attached the proper logs
  • I've read the docs
  • I've checked for duplicate issues
  • I've tried to debug myself
@mSarheed mSarheed added the 🐛 Bug Something isn't working label Jun 10, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Homarr Kanban Jun 10, 2024
Copy link

Hi 👋. Thank you for submitting your first issue to Homarr. Please ensure that you've provided all nessesary information. You can use the three dots > Edit button to update your post with additional images and information. Depending on the current volume of requests, the team should get in conact with you shortly.

@manuel-rw
Copy link
Collaborator

Hi, you might want to report this to the Home Assistant addon author. It is not maintained by us.

@mSarheed
Copy link
Author

mSarheed commented Jun 28, 2024

@manuel-rw I am now running Homarr in Docker (using Docker Compose) and still getting the same message "Unauthorized" when calling the API with the bearer personal access token that is displayed on the API page.

curl -X GET http://192.168.1.200:7575/api/boards/all \ -H "Authorization: Bearer 9d9abfbe-e189-457b-be55-728d83c38e4a" {"message":"UNAUTHORIZED","code":"UNAUTHORIZED"}

@manuel-rw
Copy link
Collaborator

Thanks for checking. I'll investigate this

@manuel-rw manuel-rw self-assigned this Jun 28, 2024
@manuel-rw manuel-rw added the 📝 Needs more info An issue that has too little information label Jun 28, 2024
@manuel-rw
Copy link
Collaborator

I'm able to reproduce locally. It seems that the reason why it's working in the API documentation is that the cookie is sent by the browser.
As a workaround, you could send the same cookie @mSarheed

@manuel-rw manuel-rw removed the 📝 Needs more info An issue that has too little information label Aug 4, 2024
Copy link

github-actions bot commented Oct 4, 2024

Hello 👋, this issue has been open for 60 days without activity. We mark issues to help prioritise and close dead issues. Can you confirm that this issue is still relevant on the latest version? I'll remove the stale label as soon as there is further activity on this issue. Thank you 🙏

@github-actions github-actions bot added the Stale label Oct 4, 2024
@Meierschlumpf
Copy link
Collaborator

API support will be greatly improved in the upcoming v1 release
Closed by homarr-labs/homarr#991
This feature will be part of v1.0, see #1993
image

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Homarr Kanban Oct 26, 2024
@Meierschlumpf Meierschlumpf added this to the v1.0.0 milestone Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working Stale
Projects
Archived in project
Development

No branches or pull requests

3 participants