-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Updated So REST API Will Work With Bot #120
base: main
Are you sure you want to change the base?
Conversation
First time coding something this i guess complicated since im self taught..this is assuming you have RESTAPIEnabled=True RESTAPIPort=8212 In your palwordsettings.ini I hardcoded it so admin is the default username so when you do /addserver and it asks for ip port there will also be a box that says username:password only enter you admin password for your server. The reason why the box says username:password is because REST API uses BASE64 to encode your password to access stuff, so i set it up where you enter your password regurlarly and then the script will now the username is admin then take your password and encode it with base64 spit that code out into the script and then decode it to get access to the server then itll send the very basic comman curl -L -X GET 'http://localhost:8212/v1/api/info' \ -H 'Accept: application/json' \ -H 'Authorization: xxxxxxx where your ip is what you entered in the pop up it then accepts the api application from palworld which asks for the authorization password which you entered and its converted...this is all i could figure out, i couldnt get it to work like the other servers with the fancy symbols and green buttons but hopefully the original person who created this will be able to edit what i did and pretty it up.
I'd recommend pushing these updates to https://github.com/opengsq/opengsq-python |
i honestly wish i knew how to do that |
I've gone ahead and created a solution for opengsq-python. I have a pending pull request. When that clears I'll bring my attention here. |
My solution was accepted and merged. I'd like to get this PR going again/refactor the code but I don't think it's worth it at this time. I see there's a discussion about revamping DiscordGSM/GameServerMonitor and pull requests don't seem to be moving right now. It might be best to focus on the protocols for right this second. If I can help with the revamp, I'm willing, but I'd have to be onboarded to the intended design and I'm unsure if @BattlefieldDuck would be up for that. I'm also only two PR's deep in my own history at this point. |
Well it would be awesome if @BattlefieldDuck would add some maintainers so the project so it could Progress. Forking it could also be possible since it’s with the MIT Licence |
First time coding something this i guess complicated since im self taught..this is assuming you have RESTAPIEnabled=True RESTAPIPort=8212
In your palwordsettings.ini
I hardcoded it so admin is the default username so when you do /addserver and it asks for ip port there will also be a box that says username:password only enter you admin password for your server. The reason why the box says username:password is because REST API uses BASE64 to encode your password to access stuff, so i set it up where you enter your password regurlarly and then the script will now the username is admin then take your password and encode it with base64 spit that code out into the script and then decode it to get access to the server then itll send the very basic comman curl -L -X GET 'http://localhost:8212/v1/api/info' \ -H 'Accept: application/json'
-H 'Authorization: xxxxxxx
where your ip is what you entered in the pop up it then accepts the api application from palworld which asks for the authorization password which you entered and its converted...this is all i could figure out, i couldnt get it to work like the other servers with the fancy symbols and green buttons but hopefully the original person who created this will be able to edit what i did and pretty it up.