Save string variables to GoogleKeep memo

Dimlos

Well-known member
The official API is for enterprise use only, and the unofficial API cannot be used due to authentication issues.
The UI Interaction allows pasting but not saving. I can't press the save button in Share Text.
Anyone know how to make it work?
 

sampleuserhere

Active member
You may help the user here by listing the references for both Official API or Unofficial API in OP. I'd assumed you were referring to this when you mentioned unofficial API.


This is the most recent issue where the auth issue was resolved.

https://github.com/kiwiz/gkeepapi/issues/156#issuecomment-1899159068

Anyway, as the UI interaction, wouldn't they be automatically synced once we exit the activity though?
 

Dimlos

Well-known member
It is possible to paste UI interactions, but the notes will disappear.
 

Attachments

  • Macro.jpg
    Macro.jpg
    302.8 KB · Views: 8

Josué García

MacroDroid Support
Staff member
The official API is for enterprise use only, and the unofficial API cannot be used due to authentication issues.
The UI Interaction allows pasting but not saving. I can't press the save button in Share Text.
Anyone know how to make it work?
You can use this intent, and later UI interaction.

Target: Activity

android.intent.action.MAIN

com.google.android.keep

com.google.android.keep.activities.ShareReceiverActivity

And it shows you the dialog, you can use the save button or simply the back button and the note will be saved.

An alternative option is also to use the Share Text action, it can do the same but pre-populate with magic text.
 

Attachments

  • IMG_20240206_235148.jpg
    IMG_20240206_235148.jpg
    450 KB · Views: 5

Dimlos

Well-known member
Is it possible to press the save button in the UI interaction text?
In my environment, it can only be pressed with coordinates.
This is not realistic because the coordinates change depending on the amount of text in the memo.

Edit: It works with Android 13 but not with Android 14.
 
Last edited:

Dimlos

Well-known member
Thank you very much. In my case the problem seems to be environment dependent.
Unfortunately I could not save the file using ID.

Edit: It works with Android 13 but not with Android 14.
 
Last edited:

sampleuserhere

Active member
I dig through the pinned issue on the above github page and it seems that this is how you get the master token.

Check out the full guide in the link below first.

Here's what I did.
  1. First I retrieved the cookies (oauth) via IceRaven (Firefox) with cookie manager.
  2. I ran the python command via Termux, filled the email and the cookie, and left the android id blank.
  3. If it works, it should return JSON data and master token is under "Token" key.

Here's how we resume the login with the master token.

Code:
import gkeepapi

keep = gkeepapi.Keep()
keep.resume("%email","%master_token")

I tested with the sample code on the main github page and it worked.

Edit: Dang, I thought the forum recognised the video. Anyway, the one below is a screenrecord.

 

Dimlos

Well-known member
Thank you very much.
I have succeeded in obtaining the master token by following the procedure you have taught me.
I have successfully added a note on Keep.
 

Dimlos

Well-known member
Here is an example configuration and script for calling from MacroDroid.
 

Attachments

  • termux:tasker.jpg
    termux:tasker.jpg
    336.8 KB · Views: 7
  • script.jpg
    script.jpg
    307.4 KB · Views: 7

sampleuserhere

Active member
For those who has security concerns about of having master token extracted.

Be aware there's a master token stored on your Android device which has the latent ability to grant access to services you might not even be accessing from it. If that token is ever exposed, you should assume that all data associated with the account is up for grabs. Use the Android Device Manager to reduce the window of opportunity if your device is stolen, or manage this master token from your security settings. Or, use a low-value account just for your android devices; and keep critical documents in a separate account.


We can always revoke the access via Account > Security > Your devices.


It's registered as unknown device. The login date is the only distinguishable information left, seemingly. So make sure to log the login date.
 
Top