Sourcegraph DocsSourcegraph Docs
Theme
  1. Docs
  2. cli
  3. references
  4. auth
  5. token

src auth token

prints the current authentication token or Authorization header.

Print the current authentication token.

Use --header to print a complete Authorization header instead.

Examples:

Raw token output:

$ src auth token sgp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Authorization header output:

$ src auth token --header Authorization: token sgp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

If you are authenticated with OAuth instead of SRC_ACCESS_TOKEN, the header uses the Bearer scheme:

$ src auth token --header Authorization: Bearer eyJhbGciOi...

Usage

SH
$ src auth token [options]

Flags

NameDescriptionDefault Value
--headerprint the token as an Authorization headerfalse

On this page

  1. `src auth token`

    1. Usage
    1. Flags

Edit this page on GitHub
View as Markdown