API Reference
This API lets your app retrieve the following data: phone number, name, date of birth, e-mail and address. This can be used to fill in forms automatically, and thus create a more smooth customer journey in your app.
The customer data can be accessed after the user allows your application to retrieve data on his/hers behalf, using OAuth.
- To obtain end user consent, the end user s device must be turned on and have a valid SIM-card, your app needs to use a cross site Ajax call to a Telenor service. This code example and technical walk through demonstrate how this works.
- Your app can display a button or other symbol that will allow the user to initiate filling out the form fields automatically.
- User is routed through the consent flow.
- If you get the consent, you will in the end have access to retrieve the customer's info.
- You call get user-info and populate the user's form.
For developers, the raw swagger doc for the whole API product can be found in one place here
user-info
GET
/user-info/v1/users
Returns info about the user of a subscription
Implementation notes
Returns the user info for the specified user based on the consent given.
Parameters
-
Authorization*
-
The authorization header containing the access token. See the oauth-v2 API for how to obtain the token. Example: "Authorization: Bearer 065d160140eea13e72cde31a7b857bbfa37390e5"
-
header
-
string
Response class (Status 200)
- mobileNumberstring
- The mobile number for the subscription where the mobile user information is fetched from
- nameName
- The name of the user
- addressAddress
- Information about the address of the user
- birthDatestring
- The birth date in ISO-8601 format.
- emailAddressstring
- The email that the user has defined as the email address to be contacted with
Name
- givenNamestring
- The given name of the user
- middleNamestring
- The middle name of the user
- familyNamestring
- The family name of the user
Address
- streetAddressstring
- The street address
- streetNumberstring
- The number of the street
- entranceCodestring
- The entrance code, or "oppgang" in Norwegian
- postalCodestring
- The postal code
- postalLocationstring
- The postal location
- countrystring
- The country for this address
- formattedPostalAddressstring
- The users address formatted to be presented directly instead of building the address from the other fields
{ "mobileNumber": "4790807060", "name": { "givenName": "Donald", "middleName": "Arthur", "familyName": "Duck" }, "address": { "streetAddress": "Otto Nielsens veg", "streetNumber": "12 A", "entranceCode": "2", "postalCode": "7052", "postalLocation": "TRONDHEIM", "country": "Norge", "formattedPostalAddress": "Otto Nielsens veg 12 A\n7052 TRONDHEIM" }, "birthDate": "1982-11-25", "emailAddress": "donald@duck.com" }
Error responses
- 400
- Bad Request:
Error code 40001 - Missing or invalid enduserId
- 401
- Unauthorized:
Error code 40101 - Invalid resource
Error code 40102 - Missing authorization header
Error code 40103 - No API product found
Error code 40104 - Not authorized to use given MSISDN
Error code 40105 - Invalid access token
Error code 40106 - Access token expired
Error code 40107 - Basic authentication not allowed for external access or not allowed for client
Error code 40108 - Invalid client id or secret for basic authentication
- 403
- Forbidden:
Error code 403001 - Invalid user info
Error code 40301 - Invalid scope
- 404
- Not Found:
Error code 40401 - Path or method not found
Error code 4042000 - Path or method not found on back-end server
- 429
- Too Many Requests:
Error code 42901 - Rate limit quota violation
Error code 42902 - Spike arrest violation
- 500
- Internal Server Error:
Error code 500001 - Internal server error
Error code 500002 - Internal server error
Error code 500003 - Internal server error
Error code 50001 - Internal Server Error
Error code 50002 - Failed to validate acr
Error code 50003 - Failed to validate subscription
- 503
- Service Unavailable:
Error code 503001 - External server error