Skip to content

Save organization names with authenticate - #953

Open
caglarpir wants to merge 1 commit into
mapillary:mainfrom
caglarpir:authenticate-save-organization
Open

caglarpir wants to merge 1 commit into
mapillary:mainfrom
caglarpir:authenticate-save-organization

Conversation

@caglarpir

@caglarpir caglarpir commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Saved organization names could be listed and deleted with authenticate, but only saved by upload. authenticate now saves them too:

mapillary_tools authenticate --user_name PROFILE --organization_key ID --organization_name NAME
  • An existing profile is not logged in again. Its token is checked and the organization is looked up, as upload does, and the ID is saved as the server returns it. If the token is rejected, the error says to add --jwt TOKEN or --user_email EMAIL to log in again.
  • With --jwt, --user_email or --user_password, or for a new profile, authenticate logs in first, then saves the name. If the organization lookup then fails, the login is kept, so a mistyped ID needs no new login: the rerun saves the name without logging in.
  • Wrong combinations fail before any prompt or change: --organization_key without --organization_name, --organization_name without --organization_key or --delete, --delete with --organization_key, an ID that is not a number, an invalid name.
  • upload --organization_key ID --organization_name NAME still saves the name. README and the command reference now show authenticate as the way to save one.
  • --organization as a short form of --organization_name no longer works with authenticate: it is ambiguous now, as it already is for upload since Add --organization_name to upload to an organization by a saved name #932.

@meta-cla meta-cla Bot added the cla signed label Nov 16, 2026
Saved organization names could be listed and deleted with authenticate, but
only saved by upload. authenticate now saves them too:

    mapillary_tools authenticate --user_name PROFILE \
        --organization_key ID --organization_name NAME

An existing profile is not logged in again: its token is checked and the
organization is looked up, as upload does, and the ID is saved as the server
returns it. If the token is rejected, the error says how to log in again.
With --jwt, --user_email or --user_password, or for a new profile,
authenticate logs in first and then saves the name. If the organization
lookup fails after the login, the login is kept, so that a mistyped ID
needs no new login.

upload --organization_key ID --organization_name NAME still saves the name.
@caglarpir
caglarpir force-pushed the authenticate-save-organization branch from bd4fd3c to 862e504 Compare November 16, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant