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

Updated So REST API Will Work With Bot #120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WhoWhoDilly69
Copy link

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.

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.
@xLeviNx
Copy link
Contributor

xLeviNx commented Oct 2, 2024

I'd recommend pushing these updates to https://github.com/opengsq/opengsq-python

@WhoWhoDilly69
Copy link
Author

i honestly wish i knew how to do that

@swesner411
Copy link

swesner411 commented Jan 19, 2025

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.

@swesner411
Copy link

swesner411 commented Jan 24, 2025

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.

@Hornochs
Copy link

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

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

Successfully merging this pull request may close these issues.

4 participants