VMware Horizon Cloud Service Next-Gen – The Automation Series – Chapter 1 – API Token
This blog post is part of the VMware Horizon Cloud Service Next-Gen – The Automation Series, a series of blog posts that describes the possibilities and use of the VMware Horizon Cloud Service Next-Gen APIs.
In this chapter we will start the creation of the API token. With this token, a so called bearer or access token can be generated and used for utilizing the APIs.
This article assumes that you have already gone through the CSP invitation link and CSP login procedures.
Let’s start by opening up the VMware Cloud Services portal.
Enter your Customer Connect credentials who is an organization owner and click SIGN IN.
Click Identity & Access Management.
Click Active Users.
Check that the user for who you want to create an API token has the following Horizon Cloud Service Roles:
- Service Gateway Administration Admin Role
- Service Gateway Image Management Admin Role
Those roles are required to the portal, admin and image services APIs.
Now logout from the VMware Cloud Services portal and logon using the user account for which you want to create the API token.
Once logged on, click your account (near right upper corner) and click My Account.
Click the API Tokens tab.
Click GENERATE A NEW API TOKEN.
Provide a Token Name and select how long the token may be valid using the Token TTL values.
Scroll down to the Define Scopes section and select All Roles. This will be scoped to the roles you selected for the user in one of the earlier steps.
Scroll all the way down and click GENERATE.
The token has now been generated. As mentioned after creation, make sure you copy the token and keep it somewhere safe. You will not be able to retrieve the token after this.
In the next chapter we will use the generated API token to create a so called bearer or access token to be able to utilize the various Horizon Cloud Service APIs.