Identity Management

GET /me

Requires authentication with user access token.

This endpoint returns the currently logged in user's object. It requires an active user session and a matching corresponding oauth token.

A session is only created when the user logs in through the web – not through the native/Facebook login for mobile apps. Use the /user/{userId} endpoint for those cases.

This means that you can also use /me to check if the user has logged in through the Schibsted account web site.

See also

Help us improve

Did you spot an error? Or maybe you just have a suggestion for how we can improve? Leave us a comment.

Request

GET /api/2/me

Example request

curl
curl https://login.schibsted.com/api/2/me -G \
   -H "Authorization: Bearer [access token]"

Response

This endpoint supports the JSON and JSON-P response formats.

Success: 200 OK

The user object

User

The user object is based on the portable contacts specification. It is extended with some custom fields. userId is an integer and represents the unique user ID, while id is a legacy uuid and should be ignored in new integrations. The uuid is also a user identifier, which is is globally unique and should therefore be the preferred identifier for a user. The email and phoneNumber fields will always contain the primary used for both if available. The corresponding *Verified fields are the date of the last time those were verified.

When requesting a user that is not connected to the authorized client, only public profile data will be available:

  • id
  • userId
  • uuid
  • status
  • displayName
  • name
  • gender
  • preferredUsername
  • utcOffset
  • published
  • updated
  • lastLoggedIn
  • locale
  • tracking

id

string

Legacy uuid. Don't use. Portable contacts

userId

integer (as string)

Unique user ID. Custom extension.

uuid

string

Unique user UUID. Custom extension. Should be preferred as the user identifier.

name

Name

JSON object containing familyName, givenName and formatted properties. See the name type for details

displayName

string

Name suitable for displaying to end-users.

published

date-time

The date this user was first added. Can return false if the user account was deleted.

updated

date-time

The most recent date the details of this user were updated

status

User status

email

string

Primary email

emailVerified

string

Date when the email was last verified.

emails

list of Email addresses

All user's registered email addresses.

phoneNumber

string

Primary phone number

phoneNumberVerified

string

Date when the phone number was last verified.

phoneNumbers

list of Phone numbers

All user's registered phone numbers.

verified

string

Date when user last verified data (email, phone number). Returns false if user wasn't verified.

url

string

photo

string

URL to a photo of the user (GIF/JPG/PNG)

preferredUsername

string

gender

string

One of undisclosed, female, male, other, withheld. Default is undisclosed. Portable contacts

birthday

date

Date of birth in YYYY-MM-DD format. Year will be 0000 if not provided. Defaults to 0000-00-00. Portable contacts

locale

string

The user's preferred locale. Locales follow ISO Language and country codes respectively, joined by an underscore.

utcOffset

string

The user's timezone, given as offset from UTC.

lastLoggedIn

datetime

Returns false if the user has not been logged in before.

lastAuthenticated

datetime

The last time the user authenticated with their password. Returns false if the user has not been authenticated before.

imported

datetime

migrated

datetime

addresses

collection of Addresses, as an object with type for property names, and Addresses for values

If user has no addresses returns empty array.

accounts

list of Third-party accounts

Third-party accounts and other client services

merchants

array

List of Schibsted account merchants the user is connected to

currentLocation

list of Addresses

If user has no current location returns empty array.

tracking

boolean

If true, the user has behavioral tracking enabled (pilot feature, may not remain as-is)

The check mark indicates that the field always contains a valid non-empty value.

Failure cases

Some HTTP response codes are used for multiple error situations. There is no consistent way to tell these apart, but the error object will contain a textual explanation of the reason for the error. For explanation on OAuth related failures and errors see OAuth authentication failures.

  • 401 Unauthorized You don't have administration rights for this client.
  • 401 Unauthorized Your client doesn't have administration rights for this client.
  • 403 Forbidden Client is not authorized to access this API endpoint. Contact Schibsted account to request access.
  • 403 Forbidden Requesting IP is not whitelisted
  • 403 Forbidden Access token rejected
  • 404 Not Found Unknown client ID
  • 404 Not Found Client ID mismatch. The client making the request is no the owner of this resource, and does not have administrative privileges for it.
  • 420 Request Ratelimit exceeded

Sample response

JSON
{
  "status": 1,
  "merchants": [
    47000
  ],
  "gender": "male",
  "userId": "981467",
  "name": {
    "familyName": "Doe",
    "givenName": "John",
    "formatted": "John Doe"
  },
  "accounts": {
    "4d00e8d6bf92fc8648000000": {
      "id": "4d00e8d6bf92fc8648000000",
      "accountName": "SPiD",
      "domain": "https://identity-pre.schibsted.com/"
    }
  },
  "locale": "nb_NO",
  "photo": "https://secure.gravatar.com/avatar/5310fe681c06576d3c27cc6508c04bbe?s\u003d200",
  "phoneNumberVerified": false,
  "phoneNumber": "",
  "displayName": "johndoe",
  "utcOffset": "+01:00",
  "emails": [
    {
      "value": "user@domain1.tld",
      "type": "other",
      "primary": "true",
      "verified": "true",
      "verifiedTime": "2014-02-10 12:52:05"
    }
  ],
  "published": "2014-02-10 12:51:45",
  "hashType": "bcrypt",
  "url": "",
  "updated": "2014-05-14 13:09:32",
  "email": "user@domain.tld",
  "lastAuthenticated": "2014-05-20 08:21:44",
  "emailVerified": "2014-02-10 12:52:05",
  "preferredUsername": "magnar",
  "currentLocation": [],
  "addresses": {
    "home": {
      "country": "NORGE",
      "streetNumber": "1",
      "longitude": "",
      "floor": "1",
      "locality": "OSLO",
      "formatted": "STREET 1, 0123 OSLO, NORGE",
      "streetEntrance": "A",
      "apartment": "H0101",
      "postalCode": "0123",
      "latitude": "",
      "type": "home",
      "region": "",
      "streetAddress": "STREET"
    }
  },
  "verified": "2014-02-10 12:52:05",
  "id": "52f8bd52efd04b2e23000001",
  "phoneNumbers": [],
  "birthday": "2003-02-01",
  "lastLoggedIn": "2014-05-20 08:21:44",
  "passwordChanged": false
}
JSON-P
callback({
  "status": 1,
  "merchants": [
    47000
  ],
  "gender": "male",
  "userId": "981467",
  "name": {
    "familyName": "Doe",
    "givenName": "John",
    "formatted": "John Doe"
  },
  "accounts": {
    "4d00e8d6bf92fc8648000000": {
      "id": "4d00e8d6bf92fc8648000000",
      "accountName": "SPiD",
      "domain": "https://identity-pre.schibsted.com/"
    }
  },
  "locale": "nb_NO",
  "photo": "https://secure.gravatar.com/avatar/5310fe681c06576d3c27cc6508c04bbe?s\u003d200",
  "phoneNumberVerified": false,
  "phoneNumber": "",
  "displayName": "johndoe",
  "utcOffset": "+01:00",
  "emails": [
    {
      "value": "user@domain1.tld",
      "type": "other",
      "primary": "true",
      "verified": "true",
      "verifiedTime": "2014-02-10 12:52:05"
    }
  ],
  "published": "2014-02-10 12:51:45",
  "hashType": "bcrypt",
  "url": "",
  "updated": "2014-05-14 13:09:32",
  "email": "user@domain.tld",
  "lastAuthenticated": "2014-05-20 08:21:44",
  "emailVerified": "2014-02-10 12:52:05",
  "preferredUsername": "magnar",
  "currentLocation": [],
  "addresses": {
    "home": {
      "country": "NORGE",
      "streetNumber": "1",
      "longitude": "",
      "floor": "1",
      "locality": "OSLO",
      "formatted": "STREET 1, 0123 OSLO, NORGE",
      "streetEntrance": "A",
      "apartment": "H0101",
      "postalCode": "0123",
      "latitude": "",
      "type": "home",
      "region": "",
      "streetAddress": "STREET"
    }
  },
  "verified": "2014-02-10 12:52:05",
  "id": "52f8bd52efd04b2e23000001",
  "phoneNumbers": [],
  "birthday": "2003-02-01",
  "lastLoggedIn": "2014-05-20 08:21:44",
  "passwordChanged": false
});

Comments/feedback

Do you have questions, or just want to contribute some newly gained insight? Want to share an example? Please leave a comment. Our team reads and responds to every question. Additionally, your experience can help others using Schibsted account, and it can help us continuously improve our documentation.