AppWorld authenticated API calls: pass access_token explicitly
AppWorld app logins do not auto-authenticate later calls, and tokens are not
persisted across separate shell execute blocks. Capture the returned
access_token and pass it explicitly to every authenticated call.
Workflow
- Get the app credentials:
creds = apis.supervisor.show_account_passwords(app_name="simple_note")
- Call the app's login endpoint and capture the token:
tok = apis.simple_note.login(
username=creds["username"], password=creds["password"]
)["access_token"]
- Pass the token explicitly to every authenticated call in the same script:
apis.simple_note.show_account(access_token=tok)
apis.simple_note.search_notes(access_token=tok)
Do not rely on a previous login call to authenticate the persistent session.
If a later execute block still returns 401, re-run the login inside that same
block and reuse the fresh token there.
When to apply
- Any AppWorld app endpoint returns 401 about a missing, invalid, or expired access token.
- The endpoint docs list a required
access_tokenparameter. - Observed for simple_note and venmo; the same explicit-token pattern applies to gmail, spotify, splitwise, todoist, amazon, phone, and file_system.
Verification
Before answering, confirm the authenticated calls returned data rather than 401.
If any 401 remains, capture the token from that same script's login call and
re-issue the failed call with access_token=tok.