Form Filling Spain
Pre-fill your forms with Orange users' data, to simplify more reliable interactions with Mobile Connect.

The Form Filling Spain API gives you information for Orange customers authenticating on your service through the Orange Authentication API. It can typically be used to enhance your sign-up process time. Using qualified Orange information, you'll be able to automatically fill forms during sign-up process on your web site. You will need the end-user's consent in order to access his information. A dedicated UI is provided with the Orange Authentication API.

Before starting

Our Form Filling Spain API requires a 3-legged authentication with our OpenID Connect platform. Please follow the method described here, with form_filling scope, in order to get an access token that will be granted to retrieve end-user's claims.

Retrieve Orange customer's information

You need a valid access token to invoke the Form Filling Spain API. This access token must be provided in the HTTP Authorization header:

curl -X GET \
    -H "Authorization: {authorization_header}" \

As an example:

curl -X GET -H "Authorization: Bearer OES-948ef...d5de1f4" 
a/ If the transaction succeed

In the context of the Form Filling Spain API, the form_filling scope gives permissions to the following claims only:

substringSubject - Issuer identifier for the end-user.
updated_atnumberTime the end-user's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.
given_namestringGiven name(s) or first name(s) of the end-user. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.
family_namestringSurname(s) or last name(s) of the end-user. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.
national_IDstringNational identifier (e.g., in accordance with eIDAS) in the following format: CC/Type/Identifier with CC (ISO 3166-1 Alpha-2 country code), Type (ID document type - ID card, passport etc.) and Identifier (ID number).
genderstring(optional) End-user's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.
birthdatestringEnd-user's birthday, represented as an ISO 8601:2004 YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed.
ageintegerUser's age in years (e.g. 33).
addressJSON objectEnd-user's preferred postal address. See Address structure below.
emailstringEnd-user's preferred e-mail address. Its value MUST conform to the RFC 5322 addr-spec syntax.
subscriber_msisdnstringUser's mobile number linked to his Orange subscription [E.164].
phone_numberstringEnd-user's preferred telephone number (E.164).
phone_number_alternateboolean(optional) User's alternate/secondary telephone number [E.164].

The Address JSON object represents a physical mailing address. It is bound of the following attributes:

formattedstringFull mailing address, formatted for display. MAY contain multiple lines, separated by newline characters (\n or \r\n).
street_addressstringMAY contain house number, street name, PO Box number. If using multiple lines, the lines are separated by newline characters.
localitystringCity, Town.
regionstringState, Province, County.
postal_codestringPost Code, ZIP code.
countrystringCountry name.

On success, the PremiumInfo request returns a 200 OK HTTP status code with JSON data containing requested claims about the end-user.

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 570
Cache-Control: no-store
Pragma: no-cache

  "sub": "PBYJJF-200-DwltrLnXq+7jwTQEkOx9Z9jelg0t0NQrxWFasUgUgEs=",
  "updated_at": 1433551702,
  "given_name": "Jane",
  "family_name": "Doe",
  "national_ID": "ES/NIF/51061998C",
  "birthdate": "1976-04-26",
  "age": 39,
  "address": {
    "formatted": "Calle Aduana, 29\n28070 Madrid\nSpain",
    "street_address": "Calle Aduana, 29",
    "locality": "Madrid",
    "region": "Madrid",
    "postal_code": "28070",
    "country": "Spain"
  "email": "",
  "subscriber_msisdn": "+34712345678",
  "phone_number": "+34712345678",
  "phone_number_alternate" : "+34972485396"
b/ If the transaction failed

In case of error, the PremiumInfo endpoint returns an error response (JSON format) with the following information:

  • code (required): single ASCII error code
  • message (required): short localized string that describes the error.
  • description (optional): human-readable ASCII text providing additional information, used to assist the developer in understanding the error that occurred.

If the access_token is missing, a 401 Unauthorized HTTP status code is returned.

HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8

   "code": 40,
   "message": "Missing or invalid credentials",
   "description": "The requested service needs credentials, but the ones provided were invalid or missing."

If the access_token is expired, revoked or invalid, a 401 Unauthorized HTTP status code is returned. In that case, you'll have to renew the access token.

HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8

    "code": 41, 
    "message": "Invalid credentials", 
    "description": "access token resource OES-948ef...d5de1f4 not found"

See API Reference section for the exhaustive list of error codes.