Authorization Edit the file on GitHub

To access privileged resources for our API you have to undergo the authorization procedure throughout the OAuth2.0 protocol.

Table of Contents

About OAuth2.0

We leverage the OAuth2.0 protocol to enable selected external applications get authorization for a User's private information from Skroutz account without requesting their Skroutz credentials.

The benefit of using OAuth2.0 is that our users can feel secure as their credentials won't have to be exposed to third parties in order to grant access to privileged user owned resources.

Quick Start

Before you begin the authorization process make sure you have obtained a valid set of client_id, client_secret.

To get one fill out our request form.

Now let's try something that requires authorization.

Search using our API

Search does not require any resources to be granted by a user, so you have to obtain an application token (see Permissions).

curl -X POST https://www.skroutz.gr/oauth2/token\?\
  client_id\=your_client_id\&\
  client_secret\=your_client_secret\&\
  grant_type\=client_credentials\&\
  scope\=public

Using the code above you'll get something like:

{
  "access_token": "a valid access token",
  "token_type":   "bearer",
  "expires_in":   2678399
}

You may then proceed performing the request using the following snippet:

curl -XGET http://api.skroutz.gr/api/search\?q\=apple \
  -H 'Accept: application/vnd.skroutz+json; version=3' \
  -H 'Authorization: Bearer your_access_token_here'

You will get the following response:

GET http://api.skroutz.gr/search?q=apple

View Response
Show Headers
Status: 200
{
  "categories": [
    {
      "id": 40,
      "name": "Κινητά Τηλέφωνα",
      "children_count": 0,
      "image_url": "https://d.scdn.gr/ds/categories/40/20150508124644_bd07441b.jpg",
      "parent_id": 86,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/40/kinhta-thlefwna.html",
      "code": "mobile",
      "path": "76,1269,86,40",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 24
    },
    {
      "id": 1705,
      "name": "Smartwatches",
      "children_count": 0,
      "image_url": "https://a.scdn.gr/ds/categories/1705/20150508163903_9d5810ce.jpg",
      "parent_id": 1912,
      "fashion": false,
      "layout_mode": "tiles",
      "web_uri": "http://skroutz.gr/c/1705/Smartwatches.html",
      "code": "smartwatch",
      "path": "76,1269,1912,1705",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 12
    },
    {
      "id": 579,
      "name": "Θήκες Κινητών Τηλεφώνων",
      "children_count": 0,
      "image_url": "https://b.scdn.gr/ds/categories/579/20150408173958_42b293c7.jpg",
      "parent_id": 86,
      "fashion": true,
      "layout_mode": "wide_tiles",
      "web_uri": "http://skroutz.gr/c/579/thikes-kinhtwn-thlefwnwn.html",
      "code": "thikes-kinhtwn-thlefwnwn",
      "path": "76,1269,86,579",
      "show_specifications": false,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 6451
    },
    {
      "id": 1105,
      "name": "Tablets",
      "children_count": 0,
      "image_url": "https://a.scdn.gr/ds/categories/1105/20150127170004_1105.jpg",
      "parent_id": 1612,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/1105/tablet.html",
      "code": "tablet",
      "path": "76,1269,1612,1105",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 50
    },
    {
      "id": 25,
      "name": "Laptops",
      "children_count": 0,
      "image_url": "https://c.scdn.gr/ds/categories/25/20150127165806_25.jpg",
      "parent_id": 769,
      "fashion": false,
      "layout_mode": "list",
      "web_uri": "http://skroutz.gr/c/25/laptop.html",
      "code": "laptop",
      "path": "76,1269,22,769,25",
      "show_specifications": true,
      "manufacturer_title": "Κατασκευαστές",
      "match_count": 21
    }
  ],
  "meta": {
    "q": "apple",
    "alternatives": [

    ],
    "strong_matches": {
      "manufacturer": {
        "id": 356,
        "name": "Apple",
        "image_url": "https://a.scdn.gr/ds/manufacturers/356/20160322115406_ae6f9a87.png"
      }
    },
    "pagination": {
      "total_results": 292,
      "total_pages": 59,
      "page": 1,
      "per": 5
    }
  }
}