iOS Shortcuts Setup
By combining the iOS “Shortcuts” app with the Pokke API, you can add bookmarks to Pokke with a single tap from the “Share” menu of any browser (like Safari) or apps with an embedded WebView (like X or news apps).
Prerequisites
Section titled “Prerequisites”Before creating the shortcut, you will need the following two pieces of information:
- API Key: Log in to Pokke and create an API key from the “API Keys” settings page (
https://pokke.femto-cloud.com/settings/api-keys). Copy the generated key. - Workspace ID: Go to the “Workspaces” page (
https://pokke.femto-cloud.com/workspaces) and copy the ID of the workspace where you want to save your bookmarks.
Creating the Shortcut
Section titled “Creating the Shortcut”Open the “Shortcuts” app on your iPhone or iPad and tap the ”+” button in the top right to create a new shortcut.
1. Setting up the Input
Section titled “1. Setting up the Input”- Tap the “i” info icon at the bottom edge (or top on older iOS versions) of the shortcut editor.
- Turn on “Show in Share Sheet” and tap “Done”.
- Look at the newly added action at the top: “Receive Any input from Share Sheet”. Tap “Any” and change it to accept only URLs. (If there’s no input, leave it as “Continue”).
2. Adding the “Get Contents of URL” Action
Section titled “2. Adding the “Get Contents of URL” Action”- Use the search bar at the bottom to find and add the “Get Contents of URL” action.
- For the URL field in the action, enter the following API endpoint:
https://api.pokke.femto-cloud.com/api/v1/bookmarks.create - Tap “Show More” (the > icon) in the action and change the Method to POST.
3. Configuring Headers
Section titled “3. Configuring Headers”In the detailed view of the “Get Contents of URL” action, add a new item under “Headers”:
- Key:
Authorization - Text:
Bearer <Your API Key>(Use the API key you got in the prerequisites. Be sure to include a space afterBearer).
4. Configuring the Request Body
Section titled “4. Configuring the Request Body”Scroll down to the “Request Body” section and change it to JSON. Add the following two fields:
- Add new field (Text)
- Key:
workspaceId - Text: The workspace ID you copied earlier.
- Key:
- Add new field (Text)
- Key:
url - Text: Select the
Shortcut Inputvariable.
- Key:
5. Saving the Shortcut
Section titled “5. Saving the Shortcut”Once configured, tap the shortcut’s name at the top of the screen and choose “Rename” to give it a recognizable name, such as “Add to Pokke”. Tap “Done” to save.
- While browsing a web page in your favorite browser or any app with a WebView, tap the “Share” icon.
- Find and tap “Add to Pokke” (or the name you chose) in the list of actions in the Share Sheet.
- (First time only) You’ll be asked to allow the shortcut to connect to the API URL. Choose “Always Allow”.
The URL of the web page you are viewing will immediately be saved to your Pokke workspace via the API.