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

Anyone tried using the API to create a iOS Shortcut to save links from iPhone? #114

Open
relink2013 opened this issue Aug 2, 2024 · 2 comments

Comments

@relink2013
Copy link

I see theres no mobile apps on the roadmap, I really want to give this a go but I have to be able to add links from my phone.

But if Grimoire has an API then it more than likely possible to create a shortcut for iOS. I just wouldn't know how to actually make it work.

@goniszewski
Copy link
Owner

Hello @relink2013! Firstly, sorry for not getting back to you sooner.

I have looked into this topic and came with a quick Apple Shortcut template you can configure yourself and use: https://www.icloud.com/shortcuts/4d84bb8c7872429aa2d486dc66a4164e

It requires you to set:

  • correct URL to your Grimoire instance
  • generating a valid token for the authorization header (for now, you need to send POST request to <GRIMOIRE_URL>/api/auth with a JSON body containing an object with login (username or e-mail) and password
  • pasting this token into the last step's (Get contents of Text) Authorization header in the place of key (just after Bearer

As for generating the token, I plan to add the ability to specify your own long-term API tokens for such integrations in the user's settings page. The existing one is being used by the web extension only.

@relink2013
Copy link
Author

Awesome, added it to my shortcuts and I'll be trying it soon.

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

No branches or pull requests

2 participants