Difference between revisions of "Sudoroom Door Shortcut for iPhone"

no edit summary
Line 37: Line 37:
Add an Encode action directly below the Text action. Make sure it says Encode Text with base64, then tap to expand it and set Line Breaks to None.
Add an Encode action directly below the Text action. Make sure it says Encode Text with base64, then tap to expand it and set Line Breaks to None.


[[File:2 encode base64.png|thumb|alt=Encode with base64, Line Breaks set to None.]]
[[File:2 encode base64.png|frame|left]]
 


=== Step 3: ===
=== Step 3: ===
Line 44: Line 45:
Add a Set Variable action. Name the variable b64creds. It should automatically show Base64 Encoded as its value; if not, tap the value and choose the Base64 Encoded result from Step 2.
Add a Set Variable action. Name the variable b64creds. It should automatically show Base64 Encoded as its value; if not, tap the value and choose the Base64 Encoded result from Step 2.


[[File:3 set variable.png|thumb|alt=Save the Base64 output as b64creds]]
[[File:3 set variable.png|frame|left]]


=== Step 4: ===
=== Step 4: ===
Line 50: Line 51:
Get Contents of URL: send the request
Get Contents of URL: send the request
Add a Get Contents of URL action. This is the step that actually contacts sudoroom.
Add a Get Contents of URL action. This is the step that actually contacts sudoroom.


===== Configure it like this: =====
===== Configure it like this: =====
Line 60: Line 60:


To add the header, tap Headers, then Add new header. In the value field type Basic and a space, then tap the variable bar above the keyboard and pick b64creds. It should appear as an orange variable bubble, as in the screenshot.
To add the header, tap Headers, then Add new header. In the value field type Basic and a space, then tap the variable bar above the keyboard and pick b64creds. It should appear as an orange variable bubble, as in the screenshot.
[[File:4 get contents of url.png|frame|left]]


===== Common mistake: =====
===== Common mistake: =====
If you type the letters “b64creds” instead of picking the variable, the shortcut sends that literal word as your password and the door won’t open. Look for the orange bubble.
If you type the letters “b64creds” instead of picking the variable, the shortcut sends that literal word as your password and the door won’t open. Look for the orange bubble.
[[File:4 get contents of url.png|thumb|alt=The finished request: GET, plus the Authorization header]]




Line 79: Line 79:
Optional: add a Show Result action at the end. It will pop up whatever the server sends back, which is very handy when something isn’t working.
Optional: add a Show Result action at the end. It will pop up whatever the server sends back, which is very handy when something isn’t working.


[[File:5 full shortcut.png|thumb|alt=complete shortcut with credentials redacted]]
 
[[File:5 full shortcut.png|frame|left]]
 


== Make it one tap ==
== Make it one tap ==