Skip to main content
OAuth clients are applications owned by an organization. They use the selected organization. Applications you have authorized are account connections, listed under photon account oauth.

Clients

--redirect-uri and --scope are repeatable; without --scope the client has no delegated scopes. The default redirect must exactly match one of the supplied redirect URIs. Redirect URIs must use HTTPS, except for HTTP loopback URLs during development. User info, fragments, duplicates, and more than ten redirect URIs are rejected before the request is sent. Creation sends an idempotency key, generated unless you pass --idempotency-key. If the outcome is uncertain — the connection dropped or Photon answered with a server error — the error names the key: retry the same command with it rather than a new one, and Photon returns the client the first request created. update replaces redirect URIs or scopes when you supply them. Use --clear-description or --clear-scopes to remove those values:
delete reports status. When Photon has accepted the deletion but provider cleanup is still pending, the CLI warns that existing tokens may keep working until it completes.

Test an authorization

authorize builds an authorization-code request and opens it, which is the fastest way to check a client’s redirect URIs and scopes:
Before it opens anything, it checks the redirect URI and scopes against the client and the scopes Photon offers. With the options omitted, it uses the client’s default redirect URI and configured scopes.
This helper only generates the authorization URL, state, and nonce. Your registered application handles the callback and exchanges the code with its own client secret — the CLI never accepts or stores that secret.

Secrets

An OAuth client has one secret. Rotating it replaces it with a new one, and the replaced secret keeps working for one hour so your application can switch over.
  • secret view returns metadata only: the current secret’s hint, creation time and last use, and the replaced secret with validUntil while it still works.
  • secret create sets up the client’s first secret. If the client already has one, it fails with OAUTH_SECRET_CONFIGURED; replace it with secret rotate.
  • secret rotate mints a new secret. The replaced secret works until previousSecretValidUntil, one hour from now; with --emergency it stops now and previousSecretValidUntil is null. A client with no secret fails with OAUTH_SECRET_NOT_CONFIGURED; set one up with secret create.
  • secret revoke stops the secret now, and a replaced secret still in its hour stops with it.
secret create and secret rotate print the plaintext secret once. Save it immediately. Photon never stores it locally, and --debug output redacts the response.Creating and rotating a secret are not journaled, and the plaintext is never stored. After an uncertain failure, retry with the --idempotency-key the error names: Photon then reports the earlier attempt’s status instead of minting a second secret, and the CLI reports OAUTH_SECRET_NOT_DELIVERED. Plaintext is only returned to the request that minted the secret, so if it was lost, rotate again.

JSON output

With --json, each command prints the API’s response as Photon sends it, with every field in it, including a field the API adds after this CLI release: update reads the client for its ETag before it changes it, and prints the response to the change. Two commands print a document the CLI defines instead. authorize builds the authorization request itself, with a state and nonce of its own, and secret revoke gets no body from Photon, so it names what it revoked:
These commands replaced photon account oauth client and photon account oauth secret, which now only point here. secret list became secret view, since a client has one secret.