I am a new python. Can you help me with this please?

I setup http://github.com/rackspace/python-cloudservers tool and it’s ok for me. But this source is difficult.

I want to use simple url to send request to server API and get response.

Example: https://auth.api.rackspacecloud.com/v1.0/flavors

But I dont know how to set API KEY and user for this link

Can you help me please?



You can find your API key in the control panel under “Your Account” -> “API Access”.

Your first request to cloud files needs to be to authenticate with the Rackspace Cloud auth system. You will then be given a token that you will use for each subsequent request until the token expires. The language bindings (Python in your case) abstract this process and offer a simpler way to access Cloud Files.

You can find this entire process, and more, described in our developer docs. http://docs.rackspacecloud.com/files/api/cf-devguide-latest.pdf

Medium Trust and Cloud Files .NET API


I’m using Cloud Files for about a month now and I’m working on application which store files in Cloud Files.

I used .NET API for Cloud files to get Stream for File in Cloud and return content of file via ASP.NET HTTP Handler.

It works fine on my Development Server but as soon as I transfer it into Cloud Sites I get this while connecting to Cloud Files:

Request for the permission of type ‘System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.

The command which I get this error is:

Connection CloudConnection = new Connection(new UserCredentials(ServerUsername, ServerPassword));

Is there anything which I need to done to be able to run application on Cloud Sites?

On my development Server I set Trust Level to Medium and I got same error!!! So I think it’s about Medium Trust, but I don’t have any idea if it’s possible to make it work on RackSpace Cloud Sites?

I really appreciate any help.


Make sure you have the latest version of the Cloudfiles API. I was getting this with the older API. Authentication is different in the new API and it works in Medium Trust.


I’m having this exact same problem, using a recent version of the API.

Does the Cloud Files .NET API definitely work in medium trust?


Definitely works. i use it every day.

Unexpected response () – Please Help


I have this in my test php file:
$auth = new CF_Authentication(MY_NAME, MY_APIKEY, NULL, UK_AUTHURL);
$conn = new CF_Connection($auth);

and all I get from authenticate is:

Fatal error: Uncaught exception ‘InvalidResponseException’ with message ‘Unexpected response (): ‘ in /home/royaltyf/public_html/cloud/cloudfiles.php:213 Stack trace: #0 /home/royaltyf/public_html/testcloud.php(10): CF_Authentication->authenticate() #1 {main} thrown in /home/royaltyf/public_html/cloud/cloudfiles.php on line 213

MY_NAME and MY_APIKEY are OK – doublechecked that…

Please Help me.


I ran into a similar issue with CentOS. Is there anymore information from the error output you didn’t display? Such as:

* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
* Closing connection #0

If you use CentOS I found the following guide will fix this issue.

Hopefully this fixes your issue. It did mine.