before getting started
Before getting started, please read the information below, and follow any instructions.
You'll then be ready to move onto the 'getting started' section.
two things to do before you get started
all about the API Manager

two things to do before you get started
To start playing with this API, please make sure you have read and understood the
Personal APIs (alpha) section
 |
You need to be an Orange Partner Member in order to use the Personal Content API and access the API manager.
If not already, become an Orange Partner member now
|
 |
Access the API Manager |
And then, within the API Manager, you'll be able to subscribe to the Personal Content API.

|
all about the API Manager
The API Manager allows you to control and configure all aspects of your Personal APIs alpha subscriptions.
Specifically you'll be able to:
gain immediate approval to use the APIs
request subscription to any or all of the APIs
gain approval for your subscription
and then receive your access key, endpoint URLs, sample codes and advanced technical documentation
|

|
The steps below describe important aspects of the interface:

The first time you log on to the API manager, we will ask you to fill in a form to provide us with information that includes:
your website URL
your website name
your website logo
This information will help us validate your subscription.
The website information you provide will be displayed to the users to enable them to set their privacy settings, which will determine whether the users allow you - the developer - to access their personal information via the Personal APIs.

You will then have access to a screen, allowing you to request a subscription to any of the APIs.
Remember, you MUST subscribe to the Authentication API first.

Once your subscription has been validated, you will receive an email and a ZIP file containing the following:
Your access key (SERVICE_ID and SERVICE PWD)
The API endpoint URL
Sample codes
Instructions on how to use it all.
access the API Manager
getting started
Now that you've read the 'before getting started' section, and become familiar with API manager, you're ready to learn about...
how to authenticate the user
adding a "Hello World" content (picture "HelloWorld.jpg")
Personal Content API methods in detail
Personal Content API error codes
Also, make sure you're familiar with the Personal APIs privacy management process.
The process protects Orange users by preventing third parties from accessing their personal data without their permission. Find out more

how to authenticate the user
Firstly, users need to be authenticated before access to their calendar is granted.
The authentication is done through the Authentication API which will return a user token.
You will then include the user token in all Personal Content API calls.
The addition of a content is a two-step process (described below):
call to Personal Content API to retrieve a Content Upload URL on "MesDonnees" service
upload the content, directly on "MesDonnees" service.
Below is an example on how the first call is made:
|
Format : [PersonalContentV1URL]?action=[action name]&token=[user token]¶m=[value]
Example : [PersonalContentV1URL]?action=getContentUploadURL&token=Hjlkzjlfkzef23423kjlkjr¶m=value…
NB: this example highlights how the user token must be transmitted in requests to the Personal Content API. For the specifics of the API (input / output parameters), see below.
|
If you want to see whether your code has worked, we can provide you with an Orange customer test account, so you can see the results as if you were an Orange customer. Once your subscription is validated, we'll show you how you can get one.

adding a "Hello World" content (picture "HelloWorld.jpg")
Adding a "Hello World" content to the "Mes Données" service of an Orange customer is easy.
Firstly, retrieve a user token using the Authentication API. This user token will be used as the "token" parameter in the Personal Content API call.
For more information, see how to authenticate the user section.
You will then be able to call the following request, in order to retrieve a content upload URL on "Mes Données" service (a picture for example) :
|
[PersonalContentV1URL]?action=getContentUploadURL&token=Hjlkzjlfkzef23423kjlkjr &content_name=HelloWorld.jpg&content_size=31163 |
In response, if successful, the Personal Content API will provide :
a cookie "downloadUploadKey"
an upload URL
|
<?xml version="1.0" encoding="UTF-8"?>
<getContentUploadURLResponse>
<url><![CDATA[ url_value ]]></url>
<cookie>
<name>downloadUploadKey</name>
<value>cookie_value</value>
</cookie>
</getContentUploadURLResponse> |
To upload your content on the user's data storage space, you will have to post it on the upload URL. The detailed process is described in the next section.
With the combination of these two calls, you will have added the Hello World picture on the user's Orange data storage space. Easy.

Personal Content API methods in detail
Retrieval of a content upload URL on a user's "Mes Données" data storage space:
Personal Content API provides one method "getContentUploadURL" to retrieve a content upload URL on a user's "Mes Données" data storage space.
The response to this method provides the upload URL, and a cookie "downloadUploadKey".
Once you have these elements, you only have to upload your content on this URL, including the cookie as a HTTP header, by following the call specification described a few paragraphs below:
getContentUploadURL
getContentUploadURL
To call the method getContentUploadURL, create the following URL format in your web application and invoke it through operation HTTP GET (warning, protocol is HTTPS):
|
Format: [PersonalContentV1URL]?action=[action name]&token=[user token]&content_name=[content_name]&content_size=[content_size]
Example: [PersonalContentV1URL]?action=getContentUploadURL&token=Hjlkzjlfkzef23423kjlkjr &content_name=HelloWorld.jpg&content_size=31163
|
input parameters
| Name |
Description |
Mandatory |
Type |
| action |
name of the Personal Content method getContentUploadURL |
Yes |
String |
| token |
User token retrieved by requesting the Authentication API |
Yes |
String |
| content_name |
name of the content to upload |
Yes |
String |
| content_size |
size (in bytes) of the content to upload" |
Yes |
Integer |
sample response
If there is no problem, the XML response will contain :

a content upload URL on "Mes Données" service

a cookie "downloadUploadKey"
Below is a response sample for this method getContentUploadURL:
|
HTTP/1.1 200 OK
Content-Language: en-US
<?xml version="1.0" encoding="UTF-8"?>
<getContentUploadURLResponse>
<url><![CDATA[ url_value ]]></url>
<cookie>
<name>downloadUploadKey</name>
<value>cookie_value</value>
</cookie>
</getContentUploadURLResponse>
|
Addition of the content on the user's "Mes Données" data storage space:
To add the content on the user's data storage space, you only have to send this content in binary format as a "file_content" parameter, in a HTTP POST request (multipart/form-data encoding type) on the HTTPS URL retrieved above, without forgetting to include the "downloadUploadKey" cookie as a HTTP header.
Please note that for security reasons, this URL is time-limited, and one-time. Should there be an error with the URL (validity expiration, other error), you will have to request for a new one (method getContentUploadURL).
Hereafter, an example for the upload request:
|
POST [UploadURL] HTTP/1.1
Connection: keep-alive Content-Type: multipart/form-data; boundary=BPziGQhPkiFc_L0GBcrC7wBLAAoudpAFRJBc Content-Length: [message length]
Cookie: downloadUploadKey=[cookie_value]
--BPziGQhPkiFc_L0GBcrC7wBLAAoudpAFRJBc Content-Disposition: form-data; name="file_content"; filename="HelloWorld.jpg" Content-Type: image/jpg Content-Transfer-Encoding: binary
[actual file content, not shown here] --BPziGQhPkiFc_L0GBcrC7wBLAAoudpAFRJBc--
|
In case of success, response will be similar to the following (you will find the XSD Schema of this response in the Client KIT):
|
<storagexmlengine> <uploadcontentdirectlyresponse> <content> <id>6174</id> <parent_id>3449</parent_id> <name>HelloWorld</name> <commentary/> <file_format/> <file_size>31163</file_size> <creation_date>2007-10-31T16:39:57.000+01:00</creation_date> <last_modification_date>2007-10-31T16:39:57.000+01:00 </last_modification_date> </content> </uploadcontentdirectlyresponse> </storagexmlengine> |

Personal Content API error codes
Method getContentUploadURL
When an error occurs, a HTTP response is returned with HTTP code 500. Response body will contain an XML stream which details the error:
|
<?xml version="1.0"? encoding="UTF-8" > <getContentUploadURLResponse> <error> <code> [code d'erreur] </code> <detail> [message d'erreur] </detail> </error> </getContentUploadURLResponse> |
Fields "code" and "detail" are of type string.
(Please note: error MD804 adds an <url> tag, along the <code> and <detail> tags)
Here is a table which describes the most significant errors:
| Error Code |
Message |
| PA003 |
Invalid input parameter "content_name" |
| PA004 |
Invalid input parameter "content_size" |
| PA900 |
Personal Content API internal error : [code] |
| MD113 |
Your "Mes donnees" service account has been deactivated. Please contact the service administrator. |
| MD327 |
Insufficient available space |
| MD803 |
User suspended. Please contact the "Mes Données" service administrator. |
| MD804 |
User unknown. The Orange user should activate first their "Mes Données" service. (*)
The response format will be :
<?xml version="1.0"? encoding="UTF-8" >
<getContentUploadURLResponse>
<error>
<code> [error code] </code>
<detail> [error message] </detail>
</error>
<url> mes données portal url </url>
</getContentUploadURLResponse> |
|
(*)Today, the service is not activated implicitly. You have to redirect the Orange user towards Mes Données portal in order for the Orange user to explicitly activate the service.
content upload
During the second request (content upload on the URL returned in response to the operation getContentUploadURL), errors will be transmitted via HTTP 400 response.
The error format is as follows:
<?xml version="1.0"?>
<mum>
<action>uploadcontent</action>
<parameters>request_parameters</parameters>
<response>
<message>error_details</message>
</response>
</mum> |
The potential errors are :
Error while creating temporary file [tmp file name]
An error has occured while writing file in temporary directory
Error while getting tmp file info
Parameter [param name] is not found in [code]
Can not create content
Error while uploading content
HTTP Request method must be POST
PreprocessURL is mis-configured
PostprocessURL is mis-configured
(back to top)