## zowe › auth › login › apiml

Log in to Zowe API Mediation Layer authentication service and obtain or update a token.

The token provides authentication to services that support the API ML SSO (Single Sign-On) capability. When you log in, the token is stored in your default base profile until it expires. Base profiles store connection information shared by multiple services (e.g., z/OSMF), and are used if you do not supply connection information in a service profile. To take advantage of the API ML SSO capability, you should omit username and password in service profiles so that the token in the base profile is used.

#### Usage

zowe auth login apiml [options]

#### Options

- `--show-token` | `--st` (boolean)

  - Show the token when login is successful. If specified, does not save the token to a profile.

#### Base Connection Options

- `--host` | `-H` (string)

  - Host name of service on the mainframe.

- `--port` | `-P` (number)

  - Port number of service on the mainframe.

- `--user` | `-u` (string)

  - User name to authenticate to service on the mainframe.

- `--password` | `--pass` | `--pw` (string)

  - Password to authenticate to service on the mainframe.

- `--reject-unauthorized` | `--ru` (boolean)

  - Reject self-signed certificates.

    Default value: true

- `--cert-file` (local file path)

  - The file path to a certificate file to use for authentication.

    Note: The CLI does not support certificate files that require a password. For more information, search Troubleshooting PEM Certificates in Zowe Docs.

- `--cert-key-file` (local file path)

  - The file path to a certificate key file to use for authentication

#### Profile Options

- `--base-profile` | `--base-p` (string)

  - The name of a (base) profile to load for this command execution.

#### Examples

- Log in to an API ML instance to obtain or update the token stored in your base profile:

  - `zowe auth login apiml`

- Log in to an API ML instance to obtain a token without storing it in a profile:

  - `zowe auth login apiml --show-token`