[GH-ISSUE #166] Pairing API Enhancements #106

Closed
opened 2026-10-15 12:56:32 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @salty2011 on GitHub (Jan 21, 2025).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/166

When there are multiple pairing requests there is no easy way to identify which request goes with what pairing codes,

/app # curl --unix-socket /var/run/wolf/wolf.sock http://localhost/api/v1/pair/pending 
{"success":true,"requests":[{"pair_secret":"REDACTED","pin":"10.1.1.3"}]}
/app # 
/app # 
/app # curl --unix-socket /var/run/wolf/wolf.sock http://localhost/api/v1/pair/client --request POST --header 'Content-Type: application/json' --data '{"pair_secret": "REDACTED","pin": "7993"}'
{"success":true}
/app #

So that we can more robustly handle multiple pairing request I suggest the following

  • Have the GET request for pairing return pair_secret, client_ip,client_name this can then be used to expose in Wolf Manager to show a list of clients awaiting pairing

So output would look something like

/app # curl --unix-socket /var/run/wolf/wolf.sock http://localhost/api/v1/pair/pending 
{"success":true,"requests":[{"pair_secret":"REDACTED","client_ip":"10.1.1.3","client_name":"iPhone"}]}

Additionally we should expand the pairing success response to also include the client_id that you would see (eg {"client_id":8868127659989293669,"app_state_folder":"8868127659989293669"} )

This would allow for easily mapping clients to use and there for be able to correctly set the state folders for each client to to be the users folder

Originally created by @salty2011 on GitHub (Jan 21, 2025). Original GitHub issue: https://github.com/games-on-whales/wolf/issues/166 When there are multiple pairing requests there is no easy way to identify which request goes with what pairing codes, ``` /app # curl --unix-socket /var/run/wolf/wolf.sock http://localhost/api/v1/pair/pending {"success":true,"requests":[{"pair_secret":"REDACTED","pin":"10.1.1.3"}]} /app # /app # /app # curl --unix-socket /var/run/wolf/wolf.sock http://localhost/api/v1/pair/client --request POST --header 'Content-Type: application/json' --data '{"pair_secret": "REDACTED","pin": "7993"}' {"success":true} /app # ``` So that we can more robustly handle multiple pairing request I suggest the following - Have the GET request for pairing return pair_secret, client_ip,client_name this can then be used to expose in Wolf Manager to show a list of clients awaiting pairing So output would look something like ``` /app # curl --unix-socket /var/run/wolf/wolf.sock http://localhost/api/v1/pair/pending {"success":true,"requests":[{"pair_secret":"REDACTED","client_ip":"10.1.1.3","client_name":"iPhone"}]} ``` Additionally we should expand the pairing success response to also include the client_id that you would see (eg {"client_id":8868127659989293669,"app_state_folder":"8868127659989293669"} ) This would allow for easily mapping clients to use and there for be able to correctly set the state folders for each client to to be the users folder
bsakaguchi 2026-10-15 12:56:32 +00:00
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
games-on-whales/wolf#106
No description provided.