Dropbox in script executed as a sharing extension
I'm just new in Pythonista and English is really not my mother language, thus sorry if I'm not clear enough.
I've written a script which uses Dropbox and connects to my Dropbox files.
My app is authorized (Dropbox, development, apps) and functions normally when I run it in normal mode under Pythonista.
But when I run it as sharing extension of another application, my token is refused...
Do I need to also authorize the "calling" app, and if yes, do I need to set in my scrip its key and secret instead of key and secret of the original one?
Thanks to help me
Just a guess, but in case you are saving your token in the keychain, using the
keychainmodule, you need to do that separately for the app extension (the keychains are currently not shared).
Thanks for your so quick answer, but I don't understand.
My script imports keychain and my key/secret are in app_key and app_secret.
Are they still valuable if my script is executed by a share in another app?
It doesn't really matter in which app you invoke the share sheet, but you can basically think of the share sheet and Pythonista as two separate apps that cannot access the same items in the keychain. However you got your key/secret into the keychain, you have to do that again within the share sheet.
Ok, understood, I'll try something else
Still thanks a lot
Why is this, anyway? Can this be a feature request, to fix this so that just like pythonista can access its own filesystem from the share sheet, it can also access its own keychain from the share sheet?
It's very weird to create a passwords.json (!!) to get around this...