Welcome, Guest
Username: Password: Remember me

TOPIC: Programmatically generate API Key and Secret Key

Programmatically generate API Key and Secret Key 1 year 6 months ago #10044

  • anoopr
  • anoopr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Hi

I use CloudStack 3.0.1.

I was wondering if it's possible to generate the API and secret keys for the "admin" user programmatically, instead of logging in to the CloudStack UI.

Thanks
The administrator has disabled public write access.

Re: Programmatically generate API Key and Secret Key 1 year 6 months ago #10073

  • gemiller
  • gemiller's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 90
  • Thank you received: 15
  • Karma: 4
See the API Reference. Under Root Admin API->User, there is a function called registerUserKeys that takes the user id and returns and API Key and Secret Key.
Last Edit: 1 year 6 months ago by gemiller. Reason: Added URL
The administrator has disabled public write access.

Re: Programmatically generate API Key and Secret Key 1 year 6 months ago #10074

  • anoopr
  • anoopr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Hey gemiller,

Thanks a bunch. I missed this because of a misreading of the API docs. I assumed you needed the API and secret keys to run registerUserKeys, not that they would be return values.

Once again, thanks,
-a
The administrator has disabled public write access.

Re: Programmatically generate API Key and Secret Key 11 months 3 weeks ago #12932

  • Gladiator
  • Gladiator's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
  • Karma: 0
Hi, I am new to Cloudstack and i am not sure about how to generate the signature using Secret key. Can you please help me out? I am getting the following error when i try to access the api:

unable to verify user credentials and/or request signature
Last Edit: 11 months 3 weeks ago by Gladiator.
The administrator has disabled public write access.
Time to create page: 0.301 seconds

Open@Citrix

Citrix supports the open source community via developer support and evangeslism. We have a number of developers and evangelists that participate actively in the open source community in Apache Cloudstack, OpenDaylight, Xen Project and XenServer. We also conduct educational activities via the Build A Cloud events held all over the world. 

Connect