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

Support more robust HTTP API #9

Open
Reisen-Wandern-Tauchen opened this issue Dec 2, 2024 · 2 comments
Open

Support more robust HTTP API #9

Reisen-Wandern-Tauchen opened this issue Dec 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Reisen-Wandern-Tauchen
Copy link

Hi Reese,

and one more question, that I thought should have it's own place for other to find more easily.

If I wanted to connect with the API, lets say by a PHP script run on the backend of my webserver, what would be the flow through the API calls?
I do understand, that the first call should / needs to be some kind of authentication token. Is this just some kind of username/password handed over in the HTTP header?

I think once I understand how this needs to be done I can most likely work myself through the rest of the API.

May you have some example how to create and hand over that authentication token to openFSD?
Probably, I'm just not smart enough to get the strings together... 🤔🤷‍♂️

Cheers,
Chris

@renorris
Copy link
Owner

renorris commented Dec 4, 2024

There's no robust API key system in place quite yet. This will come in a future release. Right now the cid and password are sent as URI parameters to /api/v1/login, which returns a token cookie. This is used to make further requests to the API. https://github.com/renorris/openfsd/blob/main/web/README.md.

@renorris renorris added the enhancement New feature or request label Dec 4, 2024
@renorris renorris changed the title using the API Support more robust HTTP API Dec 4, 2024
@Reisen-Wandern-Tauchen
Copy link
Author

Ah, I see! Will try and test it somewhere the next 2 weeks or so. I'm still a bit busy at the moment. 😉
Thanks for your quick reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants