tencent cloud

All product documents
Obtaining Credentials Through Browser Authorization
Last updated: 2024-10-17 10:52:40
Obtaining Credentials Through Browser Authorization
Last updated: 2024-10-17 10:52:40
This document describes how to use Tencent Cloud browser's authentication process to obtain credentials. Once successful, you can access and manage Tencent Cloud resources through the command-line interface (CLI).

Prerequisites

Tencent Cloud Command Line Interface (TCCLI) has been installed. For details, see Installing TCCLI.

Directions

Method 1: Using a Local Browser to Log In

1. Run the following command, and the CLI will automatically open the Tencent Cloud login page in the default browser.
tccli auth login
2. Follow the prompts on the page to log in. If the browser does not automatically display the login page, you can manually open the link based on the prompts to log in.
Your browser is open. Please complete the login according to the prompts.
https://www.tencentcloud.com/zh/account/open/authorize?scope=******
3. After successfully logging in and authorizing through the browser, you will enter the following successful login landing page.

Meanwhile, the CLI will also print the following successful login information.
Login successful. Credential has been written to: ...
4. Run the following test command to verify whether the CLI is available.
tccli cvm DescribeRegions

Method 2: Using Another Machine to Log In When No Browser Available on the Local Machine

1. Enter the following command.
tccli auth login --browser no
2. Copy the printed login address and paste it into a machine with a web browser to log in.
Go to the following link in your browser, and follow the prompts to complete the login.
https://www.tencentcloud.com/zh/account/open/authorize?scope=******
After completion, enter the verification code provided in your browser:
After completing the login and authorization process, you will enter the following verification code landing page:

3. Paste the verification code into the first machine and press Enter to complete the login. After successful login, the CLI will print the following successful login information.
Login successful. Credential has been written to: ...
4. Run the following test command to verify whether the CLI is available.
tccli cvm DescribeRegions

More Commands

1. Logout

Enter the command tccli auth logout to log out of the default account.
tccli auth logout
Logout successful. Credential has been removed: ...

2. Login to and Logout of a Specified Account

The tccli auth login command will save the account information in the default default.credential file. If you need to specify an account name, you can use the --profile flag. An example of logging in to a specified account is as follows:
tccli auth login --profile user1
Upon successful completion, the CLI will print the following information:
Login successful. Credential has been written to: .../user1.credential
Similarly, to log out of the specified account user1, you can run the following command:
tccli auth logout --profile user1


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon