cancel
Showing results for 
Search instead for 
Did you mean: 
cstauss1
Mission Specialist
Mission Specialist
  • 4,109 Views

How to get OAuth API token

Jump to solution

How and where can one get an OAuth API token in OpenShift?

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
  • 4,079 Views

I assume you are trying to extract the token to programmatically administer your cluster. If you are already logged in as a user via CLI, maybe you can try:

"oc whoami --show-token"

Another option is to log in to the OpenShift console and, click on the dropdown beside your login username on the top right hand corner > copy Login command. This will direct you to another page for authentication. Login with same credential you used to access the console and on the page, click on "Display token" to view the OAUTH token for the authenticated user.

Remember to treat the token with same level of privacy you accord your username and password for your cluster.

View solution in original post

3 Replies
Trevor
Starfighter Starfighter
Starfighter
  • 4,085 Views

Hello cstauss1,

I might be able to offer a response by
learning a little more about what you're 
attempting to do.

Thanks cstauss1

 

Trevor "Red Hat Evangelist" Chandler
0 Kudos
  • 4,080 Views

I assume you are trying to extract the token to programmatically administer your cluster. If you are already logged in as a user via CLI, maybe you can try:

"oc whoami --show-token"

Another option is to log in to the OpenShift console and, click on the dropdown beside your login username on the top right hand corner > copy Login command. This will direct you to another page for authentication. Login with same credential you used to access the console and on the page, click on "Display token" to view the OAUTH token for the authenticated user.

Remember to treat the token with same level of privacy you accord your username and password for your cluster.

cstauss1
Mission Specialist
Mission Specialist
  • 4,063 Views

Thanks-very helpful

0 Kudos
Join the discussion
You must log in to join this conversation.