Returns all available Municipalities
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/municipalities"
                
Response example
{
    "success": true,
    "message": "Municipalities List",
    "http_code": 200,
    "data": {
        "municipalities": [{
            "municipality_id": "101",
            "district_id": "1",
            "name": "Águeda",
            "slug": "agueda"
        }, {
            "municipality_id": "102",
            "district_id": "1",
            "name": "Albergaria-a-Velha",
            "slug": "albergaria-a-velha"
        }, {
        ...
        }, {
            "municipality_id": "4901",
            "district_id": "49",
            "name": "Corvo",
            "slug": "corvo"
        }]
    }
}
                
Return a list of municipalities matching a specified term
  • {:search} - term used to search municipalities
    Example value: "ilha"
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/municipalities?q=ilha"
                
Response example
{
    "success": true,
    "message": "Municipalities List",
    "http_code": 200,
    "data": {
        "municipalities": [{
            "municipality_id": "110",
            "district_id": "1",
            "name": "Ílhavo",
            "slug": "ilhavo"
        }, {
            "municipality_id": "503",
            "district_id": "5",
            "name": "Covilhã",
            "slug": "covilha"
        }]
    }
}
                
Return a list of municipalities from a specified district
  • {:district_id} - The numerical ID of the desired district municipalities (required)
    Example value: 45
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/districts/45/municipalities"
                
Response example
{
    "success": true,
    "message": "Municipalities List",
    "http_code": 200,
    "data": {
        "municipalities": [{
            "municipality_id": "4501",
            "district_id": "45",
            "name": "Calheta de São Jorge",
            "slug": "calheta-de-sao-jorge"
        }, {
            "municipality_id": "4502",
            "district_id": "45",
            "name": "Velas",
            "slug": "velas"
        }]
    }
}
                
Return a list of municipalities matching a specified term from a specified district
  • {:district_id} - The numerical ID of the desired district municipalities (required)
    Example value: 11
  • {:search} - term used to search municipalities
    Example value: "res"
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/districts/11/municipalities?q=res"
                
Response example
{
    "success": true,
    "message": "Municipalities List",
    "http_code": 200,
    "data": {
        "municipalities": [{
            "municipality_id": "1107",
            "district_id": "11",
            "name": "Loures",
            "slug": "loures"
        }, {
            "municipality_id": "1113",
            "district_id": "11",
            "name": "Torres Vedras",
            "slug": "torres-vedras"
        }]
    }
}
                
Returns all available Districts
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/districts"
                
Response example
{
    "success": true,
    "message": "Districts List",
    "http_code": 200,
    "data": {
        "districts": [{
            "district_id": "1",
            "name": "Aveiro",
            "slug": "aveiro"
        }, {
            "district_id": "2",
            "name": "Beja",
            "slug": "beja"
        }, {
            "district_id": "3",
            "name": "Braga",
            "slug": "braga"
        },
        ...
        {
            "district_id": "49",
            "name": "Ilha do Corvo",
            "slug": "ilha-do-corvo"
        }]
    }
}
                
Returns a single district, whose ID is specified by {:district_id} parameter
  • {:district_id} - The numerical ID of the desired district (required)
    Example value: 1
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/districts/1"
                
Response example
{
    "success": true,
    "message": "Districts List",
    "http_code": 200,
    "data": {
        "districts": [{
            "district_id": "1",
            "name": "Aveiro",
            "slug": "aveiro"
        }]
    }
}
                
Return a list of districts matching a specified term
  • {:search} - term used to search districts
    Example value: "ria"
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/districts?q=ria"
                
Response example
{
    "success": true,
    "message": "Districts List",
    "http_code": 200,
    "data": {
        "districts": [{
            "district_id": "10",
            "name": "Leiria",
            "slug": "leiria"
        }, {
            "district_id": "41",
            "name": "Ilha de Santa Maria",
            "slug": "ilha-de-santa-maria"
        }]
    }
}
                
Create a slideshow from multiple images
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:title} - Slideshow title (required)
    Example value: "Hello World"
  • {:transition_effect} - Transition effect to be used in the slideshow. Accepted parameters are "wipe", "fadein", "fadeout" and "crossfade" (required)
    Example value: "wipe"
  • {:slide_duration} - The time in seconds which each image should be displayed (required)
    Example value: 30
  • {:transition_duration} - The time in seconds for the transitions (required)
    Example value: 1
  • {:song[]} - The numerical ID for the song to be in the slideshow. It can be more than one
    Example value: 1
  • {:image[]} - The URL of the image to be included in the slideshow. It can be more than one (required)
    Example value: "http://c6.quickcachr.fotos.sapo.pt/i/Nd806f18f/7892261_Z8SR7.jpeg"
cURL request example
                    curl -i -H "Accept: application/json" \
                       -F "title=Hello World" \
                       -F "transition_effect=wipe" \
                       -F "slide_duration=30" \
                       -F "transition_duration=1" \
                       -F "image[]=http://c4.quickcachr.fotos.sapo.pt/i/Nf00785f3/10197771_C7tDY.png" \
                       -F "image[]=http://c6.quickcachr.fotos.sapo.pt/i/Nd806f18f/7892261_Z8SR7.jpeg" \
                       -F "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                       -X POST "http://services.sapo.pt/IPTV/MEO/Kanal/api/slideshows"
                
Response example
{
    "success": true,
    "message": "Slideshow Created",
    "http_code": 202,
    "data": {
        "slideshow": {
            "video_id": "3900"
        }
    }
}
                
Returns all available musics to include on the slideshows
cURL request example
                    curl -i -H "Accept: application/json" \
                        "http://services.sapo.pt/IPTV/MEO/Kanal/api/slideshows/musics"
                
Response example
{
    "success": true,
    "message": "Available Musics",
    "http_code": 200,
    "data": [{
        "songs": [{
            "id": "1",
            "name": "A Caruma - Coitadinha"
        }, {
            "id": "2",
            "name": "Atlantihda - Na Calma Dos Teus Olhos"
        }, {
            "id": "3",
            "name": "Bossa Nossa - Sei-te De Cor"
        }, {
            "id": "4",
            "name": "Britney Spears - I Wanna Go"
        }, {
            "id": "5",
            "name": "Chris Brown feat Justin Bieber - Next To You"
        }, {
            "id": "6",
            "name": "Classificados - Com Medo De Voar"
        }, {
            "id": "7",
            "name": "Darko - Define Joy"
        }, {
            "id": "8",
            "name": "Movimento - Acreditar"
        }, {
            "id": "9",
            "name": "Os Eléctricos - Canção da Papoila"
        }, {
            "id": "10",
            "name": "Paulo Praça - Tudo O Que Tenho Para Dar"
        }]
    }]
}
                
Returns all available effects to include on the slideshows
cURL request example
                    curl -i -H "Accept: application/json" \
                        "http://services.sapo.pt/IPTV/MEO/Kanal/api/slideshows/effects"
                
Response example
{
    "success": true,
    "message": "Available Transition Effects",
    "http_code": 200,
    "data": {
        "effects": ["wipe", "fadein", "fadeout", "crossfade"]
    }
}
                

This is the API for MEO kanal. With these set of methods you can make the same things you would do while using our site.

With this API, we want you to create awesome apps to explore all the potential in MEO kanal. If you need any help or want to ask any question, just give us a shout at kanal.developer@sapo.pt.

Here, we will try to give you a brief description of all available methods. You can also try it yourself from here, using our console, or from the command line using our cURL examples.

There are some methods that you'll need to be authenticated. That's why that big button above the API method list exist. Just authenticate, give our console authorization to access your data, and you can even create channels from our console. For our console, we are using the very same API we are trying to get you to use, with only some slighty modifications for security concerns.

To find out more click on the methods available on the menu on the left.

Endpoint for OAuth related requests:
                        https://kanal.pt/api/oauth
                    
Endpoint for API requests:
                        https://services.sapo.pt/IPTV/MEO/Kanal/api/
                    
Returns available scopes
cURL request example
                    curl -i -H "Accept: application/json" \
                      "https://services.sapo.pt/IPTV/MEO/Kanal/api/scopes"
                
Response example
{
    "success": true,
    "message": "Scopes",
    "http_code": 200,
    "data": {
        "scopes": [{
            "name": "List Channels",
            "description": "Listar canais (públicos ou privados)",
            "scope": "channel.list"
        }, {
            "name": "Create Channels",
            "description": "Criar canais (públicos ou privados)",
            "scope": "channel.create"
        ...
         {
            "name": "Remove Notifications",
            "description": "Apagar notificações de uma conta",
            "scope": "notifications.delete"
        }]
}
                

In order to make API calls on behalf of another user, your application needs to get an access token that will be unique to that user/application. The first thing you will need is to have your application registered with the API KEYS. You can register your application here.

After we review and approve your application, you will get two tokens: a client_id and a client_secret (API KEYS). These tokens will be used to request an access token on behalf of a MEO kanal user.

#1 - Ask the user to authorize your application to access his data. You will do this by sending your user using the following URL

                    GET "https://kanal.pt/api/oauth?redirect_uri={:redirect_uri}&response_type=code&scope={:scope1,:scope2,...}&client_id={:client_id}"
                
  • {:redirect_uri} - Upon successful authentication, the user will be redirected to the redirect_uri provided. You must set this value (URL) when registering your application
    Example value: https://kanal.pt/developer/console
  • {:scope} - You should list here all the permissions needed by the application. See available scopes.
    Example value: channel.list,videos.list
  • {:client_id} - We will provide you with a client_id upon application registation.
    Example value: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

If the user authorizes your application to access his data, we will redirect the user to the provided {:redirect_uri} with the inclusion of a {:code} that you'll use to exchange for an access token.

Response example
                    GET "{:redirect_uri}?code={:code}"
                

#2 - Exchange the code for an access token

                    POST "https://kanal.pt/api/oauth/access_token"

                    form-data
                        code={:code}
                        client_id={:client_id}
                        client_secret={:client_secret}
                        grant_type=authorization_code
                        redirect_uri={:redirect_uri}

                
  • {:code} - This is the code that you should have received after the previous request.
    Example value: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
  • {:client_id} - We will provide you with a client_id upon application registation.
    Example value: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
  • {:client_secret} - Besides the client_id, a client_secret will also be provided by us upon application registation.
    Example value: 572a95fee9c0f320030789e4883707affe12482fbb1ea04b3ea8267c87a890fb
  • {:redirect_uri} - Upon successful authentication, the user will be redirected to the redirect_uri provided. You must set this value (URL) when registering your application
    Example value: https://kanal.pt/developer/console
Response example
{
    "access_token": aaceb5882dd550e5d439176711c675fef56e25b8f1190f03367c210a12e2a3a0,
    "error": 0,
    "error_message": ''
}
                

OAuth 2.0 provides a cryptography-free option for authentication which is based on existing cookie authentication architecture. Instead of sending signed requests using HMAC and token secrets, the token itself is used as a secret sent over HTTPS. This allows making API calls using cURL and other simple scripting tools without having to canonicalize the request and sign it.

OAuth2 Authentication Methods

  • Authorization Code Grant

    The authorization code grant type is used to obtain both access tokens and refresh tokens and is optimized for confidential clients. As a redirection-based flow, the client must be capable of interacting with the resource owner's user-agent (typically a web browser) and capable of receiving incoming requests (via redirection) from the authorization server.

In order to make API calls on behalf of another use, your application needs to get an access token that will be unique to that user/application. The first thing you will need is to have your application registered by us. You can register your application here.

After we review and approve your application, you will get an client_id and client_secret. These tokens will be used to request an access token on behalf of a MEO kanal user.

#1 - Ask user to authorize your application to access his data. You will do this by sending your user using the following URL

                    GET "/api/oauth?redirect_uri={:redirect_uri}&response_type=code&scope={:scope1,:scope2,...}&client_id={:client_id}"
                
  • {:redirect_uri} - Upon successful authentication, user will be redirected back to the redirect_uri provided. You must set this code when registering your application
    Example value: https://kanal.pt/developer/console
  • {:scope} - You should list here all the permissions needed by the application.
    Example value: channel.list,videos.list
  • {:client_id} - We will provide you with a client_id upon application registation.
    Example value: b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

If the user authorize your application to access his data, we will redirect the user to the provided {:redirect_uri} with the inclusion of a {:code} that you'll use to exchange it for an access token.

Response example
                    GET {:redirect_uri}?code={:code}
                
Essentials to get your app talking with MEO kanal API

So, you have a great idea for an application that uses this API, but you don't know where to start?
First of all, you should register your application here., so we can give you your own and unique client ID and client Secret. You will need both of these keys to authenticate and access information on behalf of another user.

To register an application, you will need to give us an application name, a small description and a redirect URI. This redirect uri will be used to redirect users back to your application after he have authenticated with us. If you are creating a mobile application, you can use a custom URL scheme instead, such as "app://callback".

After your application has been approved, you can start accessing other users data as long as they authorize it.
Take a look at this diagram, this is the flow to get an user to authenticate and give your application access to his data.

There you go, and with the Access Token, you can now modify and create on behalf of that user. So please, store the access token carefully, we can revoke your applications credentials at any give time.

After you have an user's access token, you can now make request on his behalf. Give it a try:

                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/account/permissions?access_token={:access_token}"
                
This request will return all the scopes the user has given you access to.

Endpoint for OAuth related requests:
                        https://kanal.pt/api/oauth
                    
Endpoint for API requests:
                        https://services.sapo.pt/IPTV/MEO/Kanal/api/
                    
Returns all user notifications
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/notifications?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Notifications",
    "http_code": 200,
    "data": {
        "notifications": {
            "1": {
                "notification_id": "116750",
                "description": "O vídeo \"HTML5, CSS3, and DOM Performance\" foi importado e adicionado ao canal 314637.",
                "create_date": "2012-10-30 11:40:05",
                "read": "true"
            }
        }
    }
}
                
Returns all user notifications
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:read} - Set the notifications status. Accepted parameteres are "true" and "false" (required)
    Example value: "true"
cURL request example
                    curl -i -H "Accept: application/json" \
                      -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                      -d "read=true" \
                      -X PUT "https://services.sapo.pt/IPTV/MEO/Kanal/api/notifications"
                
Response example
{
    "success": true,
    "message": "All notifications marked as read",
    "http_code": 200,
    "data": []
}
                
Returns all user notifications
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cURL request example
                    curl -i -H "Accept: application/json" \
                      -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                      -X DELETE "https://services.sapo.pt/IPTV/MEO/Kanal/api/notifications"
                
Response example
{
    "success": true,
    "message": "Deleted all read notifications",
    "http_code": 200,
    "data": []
}
                
Returns all user MEO boxes
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/devices?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Devices",
    "http_code": 200,
    "data": {
        "devices": ["00000000-0000-0000-0000-000000000000", "11111111-1111-1111-1111-111111111111""]
    }
}
                
Remove channel from Watchlater list
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The Channel ID of the channel to be removed from watchlater list(required)
    Example value: 581
cURL request example
                    curl -i -H "Accept: application/json" \
                      -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                      -d "channel_id=581" \
                      -X DELETE "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/watchlater"
                
Response example
{
    "success": true,
    "message": "Channel removed from WatchLater List",
    "http_code": 200,
    "data": {
        "channel": {
            "channel_id": 30284,
            "title": "API Console Test"
        }
    }
}
                
Remove channel from Favorites list
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The Channel ID of the channel to be removed from favorites list(required)
    Example value: 581
cURL request example
                    curl -i -H "Accept: application/json" \
                      -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                      -d "channel_id=581" \
                      -X DELETE "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/favorites"
                
Response example
{
    "success": true,
    "message": "Channel removed from Favorite List",
    "http_code": 200,
    "data": {
        "channel": {
            "channel_id": 30284,
            "title": "API Console Test"
        }
    }
}
                
Add channel to Favorites list
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The ID of the channel to be added to favorites list(required)
    Example value: 581
cURL request example
                    curl -i -H "Accept: application/json" \
                      -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                      -d "channel_id=581" \
                      -X PUT "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/favorites"
                
Response example
{
    "success": true,
    "message": "Channel added to Favorite List",
    "http_code": 200,
    "data": {
        "channel": {
            "channel_id": 30284,
            "title": "API Console Test"
        }
    }
}
                
Add channel to Favorites list
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The ID of the channel to be added to favorites list(required)
    Example value: 581
cURL request example
                    curl -i -H "Accept: application/json" \
                      -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                      -d "channel_id=581" \
                      -X PUT "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/watchlater"
                
Response example
{
    "success": true,
    "message": "Channel added to WatchLater List",
    "http_code": 200,
    "data": {
        "channel": {
            "channel_id": 30284,
            "title": "API Console Test"
        }
    }
}
                
Returns all user channels marked as Watchlater
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cURL request example
                    curl -i -H "Accept: application/json" \
                      "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/watchlater?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Favorite Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "30284",
            "channel_number": "815812",
            "title": "API Console Test",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/logoce9c338745bdfb3e7944aa9754c19296-500x500.png",
            "description": "API Console Test"
        }]
    }
}
                
Returns all user channels marked as favorites
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cURL request example
                    curl -i -H "Accept: application/json" \
                      "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/favorites?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Favorite Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "30284",
            "channel_number": "815812",
            "title": "API Console Test",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/logoce9c338745bdfb3e7944aa9754c19296-500x500.png",
            "description": "API Console Test"
        }]
    }
}
                
Return all user videos
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:offset} - Starting order number for videos. The first offset-1 elements will be skipped
    Example value: 0
  • {:limit} - Number of videos to be returned (max value 100)
    Example value: 15
  • {:group_id} - The numerical ID of the desired group
    Example value: 458
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Videos List",
    "http_code": 200,
    "data": {
        "slideshows": [{
            "video_id": "218681",
            "title": "Teste",
            "length": "20",
            "length_hours": "00:00:20",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-04-18 16:04:39",
            "type": "slideshow"
        }],
        "videos": [{
            "video_id": "564133",
            "title": "HTML5, CSS3, and DOM Performance",
            "length": "1719",
            "length_hours": "00:28:39",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-10-30 11:17:47",
            "type": "video"
        }, {
            "video_id": "484331",
            "title": "Teach a Dog to REST",
            "length": "969",
            "length_hours": "00:16:09",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-09-13 15:13:28",
            "type": "video"
        }],
        "videos_in_response": 2,
        "slideshows_in_response": 1,
        "limit": 3,
        "offset": 0,
        "items_total": 14,
        "items_in_response": 3
    }
}
                
Upload a video

#1 - Request Upload Token

  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:title} - Video title
    Example value: "Hello World"
  • {:description} - Video description
    Example value: "Lorem Ipsum"
  • {:channel_id} - The numerical ID of the desired channel to where the video will be added
    Example value: 458
  • {:group_id} - The numerical ID of the desired group
    Example value: 459
  • {:tags} - Videos tags, separeted by a comma (,).
    Example value: rest, api
cURL request example
                    curl -i -H "Accept: application/json" \
                        -F "title=Hello World" \
                        -F "channel_id=30284" \
                        -F "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                        -X POST "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos/prepare_upload"
                
Response example
{
    "success": true,
    "message": "Upload Token Created",
    "http_code": 200,
    "data": {
        "token": "a23a480c400d9daecda7fc696cbcb2d3c4351a913c727af61c4eaf5fb2a0e0d27500f2c43462c4d9c6a7443dafb1d110afcdbba4804e8c46fe60f28cc80eac0300ad90c6f98151accb5a0642c5175df778236af956a2306edbc3cb2f2865d5a35298645fcdb2ea2a0fe946ca52bf209680b268e5f8a196403b83269ab8c2727fa6ae5c4f35aeeebec81ca35e7e4217b011b7effa36e6a6fef7561409e2d46678c38599097f2e0bc071476bf2c5f99ddc1d1796f07748f878a6a5687e83634d80",
        "video_id": 38479,
        "redir": "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos/finish_upload?token=a23a480c400d9daecda7fc696cbcb2d3c4351a913c727af61c4eaf5fb2a0e0d27500f2c43462c4d9c6a7443dafb1d110afcdbba4804e8c46fe60f28cc80eac0300ad90c6f98151accb5a0642c5175df778236af956a2306edbc3cb2f2865d5a35298645fcdb2ea2a0fe946ca52bf209680b268e5f8a196403b83269ab8c2727fa6ae5c4f35aeeebec81ca35e7e4217b011b7effa36e6a6fef7561409e2d46678c38599097f2e0bc071476bf2c5f99ddc1d1796f07748f878a6a5687e83634d80"
    }
}
                

#2 - Upload File

Endpoint for file upload:
                        http://uploader.nexttv.sapo.pt/upload_token.html
                    
  • {:token} - The Token that you've obtained in the last step (required)
    Example value: a23a480c400d9daecda7fc696cbcb2d3c4351a913c727af61c4eaf5fb2a0e0d27500f2c43462c4d9c6a7443dafb1d110afcdbba4804e8c46fe60f28cc80eac0300ad90c6f98151accb5a0642c5175df778236af956a2306edbc3cb2f2865d5a35298645fcdb2ea2a0fe946ca52bf209680b268e5f8a196403b83269ab8c2727fa6ae5c4f35aeeebec81ca35e7e4217b011b7effa36e6a6fef7561409e2d46678c38599097f2e0bc071476bf2c5f99ddc1d1796f07748f878a6a5687e83634d80
  • {:content_file} - File to be uploaded (required)
  • {:redir} - You should use the redir included in the response of step #1
    Example value: "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos/a23a480c400d9daecda7fc696cbcb2d3c4351a913c727af61c4eaf5fb2a0e0d27500f2c43462c4d9c6a7443dafb1d110afcdbba4804e8c46fe60f28cc80eac0300ad90c6f98151accb5a0642c5175df778236af956a2306edbc3cb2f2865d5a35298645fcdb2ea2a0fe946ca52bf209680b268e5f8a196403b83269ab8c2727fa6ae5c4f35aeeebec81ca35e7e4217b011b7effa36e6a6fef7561409e2d46678c38599097f2e0bc071476bf2c5f99ddc1d1796f07748f878a6a5687e83634d80/finish_upload"
cURL request example
                    curl -i -L \
                        -F "token=a23a480c400d9daecda7fc696cbcb2d3c4351a913c727af61c4eaf5fb2a0e0d27500f2c43462c4d9c6a7443dafb1d110afcdbba4804e8c46fe60f28cc80eac0300ad90c6f98151accb5a0642c5175df778236af956a2306edbc3cb2f2865d5a35298645fcdb2ea2a0fe946ca52bf209680b268e5f8a196403b83269ab8c2727fa6ae5c4f35aeeebec81ca35e7e4217b011b7effa36e6a6fef7561409e2d46678c38599097f2e0bc071476bf2c5f99ddc1d1796f07748f878a6a5687e83634d80" \
                        -F "content_file=@video.mp4" \
                        -F "redir=https://services.sapo.pt/IPTV/MEO/Kanal/api/videos/a23a480c400d9daecda7fc696cbcb2d3c4351a913c727af61c4eaf5fb2a0e0d27500f2c43462c4d9c6a7443dafb1d110afcdbba4804e8c46fe60f28cc80eac0300ad90c6f98151accb5a0642c5175df778236af956a2306edbc3cb2f2865d5a35298645fcdb2ea2a0fe946ca52bf209680b268e5f8a196403b83269ab8c2727fa6ae5c4f35aeeebec81ca35e7e4217b011b7effa36e6a6fef7561409e2d46678c38599097f2e0bc071476bf2c5f99ddc1d1796f07748f878a6a5687e83634d80/finish_upload" \
                        "http://uploader.nexttv.sapo.pt/upload_token.html"
                
Response example
{
    "success": true,
    "message": "Video Uploaded",
    "http_code": 200,
    "data": {
        "video_id": "3848"
    }
}
                
Returns a single video, whose ID is specified by {:video_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:video_id} - The numerical ID of the desired video (required)
    Example value: 484331
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos/484331?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Videos List",
    "http_code": 200,
    "data": {
        "videos": [{
            "video_id": "484331",
            "title": "Teach a Dog to REST",
            "length": "969",
            "length_hours": "00:16:09",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-09-13 15:13:28",
            "type": "video"
        }],
        "total": {
            "length": 969,
            "length_hours": "00:16:09",
            "items": 1,
            "videos": 1,
            "slideshows": 0
        }
    }
}
                
Updates a video metadata, whose ID is specified by {:video_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:video_id} - The numerical ID of the desired video (required)
    Example value: 484331
  • {:title} - Video title
    Example value: "Hello World"
  • {:description} - Video description
    Example value: "Lorem Ipsum"
  • {:group_id} - The numerical ID of the desired group
    Example value: 459
  • {:tags} - Videos tags, separeted by a comma (,).
    Example value: rest, api
cURL request example
                    curl -i -H "Accept: application/json" \
                        -X POST "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos/484331?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Video updated",
    "http_code": 200,
    "data": {
        "videos": [{
            "video_id": "484331",
            "title": "Hello World",
            "description": "Lorem Ipsum",
            "length": "179",
            "length_hours": "00:02:59",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "groups": [{
                "group_id": "459",
                "name": "Group #1"
            }],
            "created": "2013-02-14 18:08:10",
            "type": "video",
            "tags": ["api", "rest"]
        }]
    }
}
                
Return a list of videos matching a specified term
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:search} - term used to search videos
    Example value: "REST"
  • {:offset} - Starting order number for videos. The first offset-1 elements will be skipped
    Example value: 0
  • {:limit} - Number of videos to be returned (max value 100)
    Example value: 15
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos?q=REST&access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Videos List",
    "http_code": 200,
    "data": {
        "videos": [{
            "video_id": "484331",
            "title": "Teach a Dog to REST",
            "length": "969",
            "length_hours": "00:16:09",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-09-13 15:13:28",
            "type": "video"
        }],
        "videos_in_response": 1,
        "slideshows_in_response": 0,
        "limit": 10,
        "offset": 0,
        "items_total": 1,
        "items_in_response": 1
    }
}
                
Deletes a single video, whose ID is specified by {:video_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:video_id} - The numerical ID of the desired video to be deleted (required)
    Example value: 484331
cURL request example
                    curl -i -H "Accept: application/json" \
                        -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                        -X DELETE "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos/484331"
                
Response example
{
    "success": true,
    "message": "Video Deleted",
    "http_code": 200,
    "data": {
        "video": {
            "video_id": "484331",
            "title": "Teach a Dog to REST"
        }
    }
}
                
List all videos with the tag {:tag}
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:tag} - Tag name (required)
    Example value: rest
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/videos/tag/rest?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"                    
                
Response example
{
    "success": true,
    "message": "Video Deleted",
    "http_code": 200,
    "data": {
        "videos": [
            {
                "video_id": "484331",
                "title": "Teach a Dog to REST",
                "length": "969",
                "length_hours": "00:16:09",
                "hd": false,
                "status_id": "10",
                "status": "OK",
                "created": "2012-09-13 15:13:28",
                "type": "video"
                "tags": [
                    "rest",
                    "api"
                ]
            }
        ],
        "videos_in_response": 1,
        "slideshows_in_response": 0,
        "limit": 15,
        "offset": 0,
        "items_total": 1,
        "items_in_response": 1
    }
}
                
List all groups
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/groups?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"                    
                
Response example
{
    "success": true,
    "message": "Groups",
    "http_code": 200,
    "data": {
        "groups": [
            {
                "group_id": "468",
                "name": "Group #1",
                "type": "video",
                "creation_date": "2013-02-14 15:33:23",
                "update_date": "2013-02-14 15:33:23",
                "items": "0"
            },
            {
                "group_id": "466",
                "name": "Group #2",
                "type": "video",
                "creation_date": "2013-02-14 14:56:47",
                "update_date": "2013-02-14 14:56:47",
                "items": "0"
            }
        ]
    }
}
                
Add group
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:name} - Group name (required)
    Example value: Tutorials
  • {:type} - Group type, must be "video" or "slideshow" (required)
    Example value: video
cURL request example
                    curl -i -H "Accept: application/json" \
                        -F "name=Tutorials" \
                        -F "type=video" \
                        -F "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                        -X POST "https://services.sapo.pt/IPTV/MEO/Kanal/api/groups"                        
                
Response example
{
    "success": true,
    "message": "Group Created",
    "http_code": 200,
    "data": {
        "group": {
            "group_id": 469,
            "name": "Tutorials"
        }
    }
}
                
Delete group
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:group_id} - ID of the group to be deleted (required)
    Example value: Tutorials
cURL request example
                    curl -i -H "Accept: application/json" \
                        -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                        -X DELETE "https://services.sapo.pt/IPTV/MEO/Kanal/api/groups/469" 
                
Response example
{
    "success": true,
    "message": "Group Deleted",
    "http_code": 200,
    "data": {
        "group": {
            "group_id": 469,
            "name": "Tutorials"
        }
    }
}
                
Returns the channel schedule, whose channel ID is specified by {:channel_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The numerical ID of the desired channel schedule (required)
    Example value: 30284
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/30284/schedule?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "List schedule",
    "http_code": 200,
    "data": {
        "videos": [{
            "video_id": "484331",
            "title": "Teach a Dog to REST",
            "length": "969",
            "length_hours": "00:16:09",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-09-13 15:13:28",
            "type": "video",
            "start_hours": "00:00:00",
            "position": 1
        }],
        "total": {
            "length": 969,
            "length_hours": "00:16:09",
            "items": 1,
            "videos": 1,
            "slideshows": 0
        },
        "auto-shuffle": {
            "active": false
        }
    }
}
                
Delete the schedule from the channel whose ID is specified by {:channel_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The numerical ID of the desired channel schedule to be deleted (required)
    Example value: 30284
cURL request example
                    curl -i -H "Accept: application/json" \
                        -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                        -X DELETE "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/30284/schedule"
                
Response example
{
    "success": true,
    "message": "Schedule deleted, channel off",
    "http_code": 200,
    "data": []
}
                
Insert a video into a channel schedule, whose channel ID is specified by {:channel_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The numerical ID of the desired channel schedule to be updated (required)
    Example value: 30284
  • {:video_id} - The numerical ID of the desired video to be added to schedule (required)
    Example value: 564133
  • {:position} - The numerical position where the video should be in the schedule (required)
    Example value: 1
cURL request example
                    curl -i -H "Accept: application/json" \
                        -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                        -d "video_id=564133" \
                        -d "position=1" \
                        -X PUT "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/30284/schedule"
                
Response example
{
    "success": true,
    "message": "Schedule updated",
    "http_code": 200,
    "data": {
        "videos": [{
            "video_id": "564133",
            "title": "HTML5, CSS3, and DOM Performance",
            "length": "1719",
            "length_hours": "00:28:39",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-10-30 11:17:47",
            "type": "video",
            "start_hours": "00:00:00",
            "position": 1
        }, {
            "video_id": "484331",
            "title": "Teach a Dog to REST",
            "length": "969",
            "length_hours": "00:16:09",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-09-13 15:13:28",
            "type": "video",
            "start_hours": "00:28:39",
            "position": 2
        }],
        "total": {
            "length": 2688,
            "length_hours": "00:44:48",
            "items": 2,
            "videos": 2,
            "slideshows": 0
        }
    }
}
                
Enable or disable channel schedule auto-shuffle, whose channel ID is specified by {:channel_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The numerical ID of the desired channel (required)
    Example value: 30284
  • {:active} - Set auto-shuffle status. Accepted parameters are "true" to enable it and "false" to disable it (required)
    Example value: "true"
cURL request example
                  curl -i -H "Accept: application/json" \
                    -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                    -d "active=1" \
                    -X PUT "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/30284/schedule/shuffle"
                
Response example
{
    "success": true,
    "message": "Auto-shuffle enabled",
    "http_code": 200,
    "data": []
}
                
Sets the schedule for the channel whose ID is specified by {:channel_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The numerical ID of the desired channel where the schedule should be created (required)
    Example value: 30284
  • {:video_id[]} - The numerical ID of the desired video to be added to {:channel_id} schedule. You can pass this parameter more than once (required)
    Example value: 484331
cURL request example
                    curl -i -H "Accept: application/json" \
                       -F "video_id[]=484331" \
                       -F "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                       -X POST "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/30284/schedule"
                
Response example
{
    "success": true,
    "message": "Schedule created",
    "http_code": 201,
    "data": {
        "videos": [{
            "video_id": "484331",
            "title": "Teach a Dog to REST",
            "length": "969",
            "length_hours": "00:16:09",
            "hd": false,
            "status_id": "10",
            "status": "OK",
            "created": "2012-09-13 15:13:28",
            "type": "video",
            "start_hours": "00:00:00",
            "position": 1
        }],
        "total": {
            "length": 969,
            "length_hours": "00:16:09",
            "items": 1,
            "videos": 1,
            "slideshows": 0
        }
    }
}
                
Return a list of channels owned by access_token owner
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "30284",
            "channel_number": "815812",
            "title": "API Console Test",
            "short_title": "",
            "description": "API Console Test",
            "privacy": "public",
            "category_id": "14",
            "category": "Jogos e Tecnologia",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/logoce9c338745bdfb3e7944aa9754c19296-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/iconce9c338745bdfb3e7944aa9754c19296-50x50.png",
            "district_id": "0",
            "district": null,
            "municipality_id": "0",
            "municipality": null,
            "state": "disabled",
            "pin": null,
            "tv_info_mode": "none"
        }],
        "limit": 15,
        "offset": 0,
        "items_total": 1,
        "items_in_response": 1
    }
}
                
Returns a single channel, whose ID is specified by {:channel_id} parameter
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The numerical ID of the desired channel (required)
    Example value: 30284
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/30284?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "30284",
            "channel_number": "815812",
            "title": "API Console Test",
            "short_title": "",
            "description": "API Console Test",
            "privacy": "public",
            "category_id": "14",
            "category": "Jogos e Tecnologia",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/logoce9c338745bdfb3e7944aa9754c19296-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/iconce9c338745bdfb3e7944aa9754c19296-50x50.png",
            "district_id": "0",
            "district": null,
            "municipality_id": "0",
            "municipality": null,
            "state": "disabled",
            "pin": null,
            "tv_info_mode": "none"
        }],
        "items_in_response": 1
    }
}
                
Create a channel, specifying it's parameters
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:privacy} - Set the channel visibility. Accepted parameteres ares "public" and "private" (required)
    Example value: "public"
  • {:title} - Channel title (required)
    Example value: "API Console Test"
  • {:logo} - Channel logo, you must send it as an input file (required)
    Example value: "default.jpg"
  • {:description} - Channel logo, you must send it as an input file (required)
    Example value: "API Console Test"
  • {:category_id} - Numerical ID of the chanenl category, see "List channel categories" for available values (required)
    Example value: 14
  • {:tv_info_mode} - This specify if the logo and title should be always visible on the channel. Accepted parameters are "none", "both", "icon_only" and "short_title_only" (required)
    Example value: "both"
cURL request example
curl -i -H "Accept: application/json" \
    -F logo=@default.png \
    -F "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
    -F "privacy=public" \
    -F "title=API Console Testt" \
    -F "description=API Console Test" \
    -F "category_id=14" \
    -F "tv_info_mode=both" \
    -X POST "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels"
                
Response example
{
    "success": true,
    "message": "Channel created",
    "http_code": 201,
    "data": {
        "channel": {
            "channel_id": "30284",
            "channel_number": "815812",
            "pin": null
        }
    }
}
                
Update a channel, specifying the channel ID and the parameters to be updated
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The numerical ID of the desired channel (required)
    Example value: 30284
  • {:privacy} - Set the channel visibility. Accepted parameteres ares "public" and "private"
    Example value: "private"
  • {:title} - Channel title
    Example value: "Console Channel Creation Test"
  • {:title} - Channel short title
    Example value: "New Short Title"
  • {:logo} - Channel logo, you must send it as an input file
    Example value: "default.jpg"
  • {:description} - Channel logo, you must send it as an input file
    Example value: "This is a channel description"
  • {:category_id} - Numerical ID of the chanenl category, see "List channel categories" for available values
    Example value: 14
  • {:tv_info_mode} - This specify if the logo and title should be always visible on the channel. Accepted parameters are "none", "both", "icon_only" and "short_title_only"
    Example value: "both"
cURL request example
curl -i -H "Accept: application/json" \
    -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
    -d "privacy=public" \
    -d "short_title=New Short Title" \
    -d "tv_info_mode=both" \
    -X PUT "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/30284"
                
Response example
{
    "success": true,
    "message": "Channel updated",
    "http_code": 200,
    "data": {
        "channels": {
            "channels": [{
                "channel_id": "30284",
                "channel_number": "815812",
                "title": "API Console Test",
                "short_title": "New Short Title",
                "description": "API Console Test",
                "privacy": "public",
                "pin": null,
                "district_id": "0",
                "district": null,
                "municipality_id": "0",
                "municipality": null,
                "category_id": "14",
                "category": "Jogos e Tecnologia",
                "created": "2012-11-14 13:33:19",
                "updated": "2012-11-14 13:46:25",
                "tv_info_mode": "none",
                "logo": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/logoce9c338745bdfb3e7944aa9754c19296-500x500.png",
                "icon": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/iconce9c338745bdfb3e7944aa9754c19296-50x50.png",
                "state": "disabled"
            }],
            "items_total": 1,
            "items_in_response": 1
        }
    }
}
                
Return a list of channels matching a specified term
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:search} - term used to search channels
    Example value: "console"
  • {:offset} - Starting order number for channels. The first offset-1 elements will be skipped
    Example value: 0
  • {:limit} - Number of channels to be returned (max value 100)
    Example value: 15
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels?q=console&access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                
Response example
{
    "success": true,
    "message": "Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "30284",
            "channel_number": "815812",
            "title": "API Console Test",
            "short_title": "",
            "description": "API Console Test",
            "privacy": "public",
            "category_id": "14",
            "category": "Jogos e Tecnologia",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/logoce9c338745bdfb3e7944aa9754c19296-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/cc/10d/30284/iconce9c338745bdfb3e7944aa9754c19296-50x50.png",
            "district_id": "0",
            "district": null,
            "municipality_id": "0",
            "municipality": null,
            "state": "disabled",
            "pin": null,
            "tv_info_mode": "none"
        }],
        "limit": 15,
        "offset": 0,
        "items_total": 1,
        "items_in_response": 1
    }
}
                
Deletes a single channel, whose ID is specified by {:channel_id} parameter
This method requires a special access grant. If you really need it, tell us why on the notes field when registering your application.
  • {:access_token} - The Access Token that identifies a user (required)
    Example value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • {:channel_id} - The numerical ID of the desired channel to be deleted (required)
    Example value: 30284
cURL request example
                    curl -i -H "Accept: application/json" \
                        -d "access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
                        -X DELETE "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/30284"
                
Response example
{
    "success": true,
    "message": "Channel deleted",
    "http_code": 200,
    "data": {
        "channel": {
            "channel_id": "30284",
            "channel_number": "815812",
        }
    }
}
                
Return a list of public channels matching a specified term
  • {:search} - term used to search channels (required)
    Example value: "kanal"
  • {:offset} - Starting order number for channels. The first offset-1 elements will be skipped
    Example value: 0
  • {:limit} - Number of channels to be returned
    Example value: 15
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels?q=kanal"
                
Response example
{
    "success": true,
    "message": "Channels List",
    "http_code": 200,
    "data": {
        "channels": {
            {
                "channel_id": "567",
                "channel_number": "792342",
                "title": "Web Vídeos MEO kanal",
                "short_title": "Web Vídeos MEO kanal",
                "description": "Web Vídeos MEO kanal",
                "privacy": "private",
                "pin": "8938",
                "district_id": "0",
                "district": null,
                "municipality_id": "0",
                "municipality": null,
                "created": "2012-09-27 18:48:50",
                "tv_info_mode": "icon_only",
                "logo": "http://nexttv.dev.sapo.pt/imgs/channels/99/c5e/567/logo106aefd64083daae5bff3d689ea7f44c-500x500.png",
                "icon": "http://nexttv.dev.sapo.pt/imgs/channels/99/c5e/567/icon106aefd64083daae5bff3d689ea7f44c-50x50.png"
            }
        },
        "total": {
            "private": 0,
            "public": 1,
            "items": 1
        }
    }
}
                
Returns all channels categories
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/categories"
                
Response example
{
    "success": true,
    "message": "Categories List",
    "http_code": 200,
    "data": {
        "categories": [{
            "category_id": "23",
            "name": "Arte e Cultura"
        }, {
            "category_id": "24",
            "name": "Como fazer"
        },
        ...
        {
            "category_id": "21",
            "name": "Viagens e Lazer"
        }]
    }
}
                
Return a list of channel categories matching a specified term
  • {:search} - term used to search channel categories
    Example value: "fazer"
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/categories?q=fazer"
                
Response example
{
    "success": true,
    "message": "Categories List",
    "http_code": 200,
    "data": {
        "categories": [{
            "category_id": "14",
            "name": "Como fazer"
        }]
    }
}
                
Returns most visited channels
  • {:offset} - Starting order number for channels. The first offset-1 elements will be skipped
    Example value: 0
  • {:limit} - Number of channels to be returned (max value 100)
    Example value: 15
cURL request example
                    curl -i -H "Accept: application/json" \
                      "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/top?offset=0&limit=15"
                
Response example
{
    "success": true,
    "message": "Top Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "25254",
            "channel_number": "244758",
            "title": "Mafalda Silva",
            "short_title": "",
            "description": "1",
            "privacy": "public",
            "category_id": "9",
            "category": "Música",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/59/667/25254/logo04c28c9b0381b5a097a71f02c892bd2a-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/59/667/25254/icon04c28c9b0381b5a097a71f02c892bd2a-50x50.png",
            "district_id": "0",
            "district": null,
            "municipality_id": "0",
            "municipality": null,
            "state": "enabled"
        }, {
            "channel_id": "24870",
            "channel_number": "180791",
            "title": "Kanal Musica Brasileira",
            "short_title": "",
            "description": "Musica Brasileira os Tops actuais, as mais recentes,e os classicos de sempre.",
            "privacy": "public",
            "category_id": "9",
            "category": "Música",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/8a/c8a/24870/logo1a5b04eeb73f21d1257aa4479edeb48f-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/8a/c8a/24870/icon1a5b04eeb73f21d1257aa4479edeb48f-50x50.png",
            "district_id": "13",
            "district": "Porto",
            "municipality_id": "1314",
            "municipality": "Santo Tirso",
            "state": "enabled"
        }],
        "limit": 2,
        "offset": 0,
        "items_total": 100,
        "items_in_response": 2
    }
}
                
Returns highlighted channels
  • {:offset} - Starting order number for channels. The first offset-1 elements will be skipped
    Example value: 0
  • {:limit} - Number of channels to be returned (max value 100)
    Example value: 15
cURL request example
                    curl -i -H "Accept: application/json" \
                      "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/highlights?offset=0&limit=15"
                
Response example
{
    "success": true,
    "message": "Highlighted Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "28442",
            "channel_number": "518800",
            "title": "Lisbon e Estoril Film Festival",
            "short_title": "LEFF",
            "description": "De 9 a 18 de Novembro, em Lisboa e no Estoril. No seu sexto ano, o evento prepara-se para reunir o que de melhor se faz no mundo da 7ª arte.",
            "privacy": "public",
            "category_id": "6",
            "category": "Arte e Cultura",
            "logo": null,
            "icon": null
        }, {
            "channel_id": "15355",
            "channel_number": "643891",
            "title": "Diário do Sul TV",
            "short_title": "DSTV",
            "description": "Canal de notícias publicadas no único jornal diário do Alentejo",
            "privacy": "public",
            "category_id": "6",
            "category": "Arte e Cultura",
            "logo": null,
            "icon": null
        }],
        "limit": 2,
        "offset": 0,
        "items_total": 100,
        "items_in_response": 2
    }
}
                
Returns all channels from specified category
  • {:category_id} - The numerical value representing whose category ID channels should be listed (required)
    Example value: 2
  • {:offset} - Starting order number for channels. The first offset-1 elements will be skipped
    Example value: 0
  • {:limit} - Number of channels to be returned (max value 100)
    Example value: 2
cURL request example
                    curl -i -H "Accept: application/json" \
                      "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels/categories/2?offset=0&limit=2"
                
Response example
{
    "success": true,
    "message": "Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "6",
            "channel_number": "656467",
            "title": "MEO Jogos",
            "short_title": "MEO Jogos",
            "description": "Os trailers e as novidades do serviço MEO Jogos. Mais informação em meo.pt/jogos.",
            "privacy": "public",
            "category_id": "2",
            "category": "Entretenimento e Humor",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/16/790/6/logo939148180f3764dba344b7c47335e27b-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/16/790/6/icon49eb496a7c360bbd22a8e08b08ac945a-50x50.png",
            "district_id": "11",
            "district": "Lisboa",
            "municipality_id": "1106",
            "municipality": "Lisboa",
            "state": "enabled"
        }, {
            "channel_id": "19",
            "channel_number": "936684",
            "title": "MyTVShows",
            "short_title": "MyTVShows",
            "description": "Os trailers das melhores séries que pode seguir no MyTVShows",
            "privacy": "public",
            "category_id": "2",
            "category": "Entretenimento e Humor",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/1f/0e3/19/logo6b10b5cfd782d5d34d5457031bdb233a-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/1f/0e3/19/icon6b10b5cfd782d5d34d5457031bdb233a-50x50.png",
            "district_id": "11",
            "district": "Lisboa",
            "municipality_id": "1106",
            "municipality": "Lisboa",
            "state": "enabled"
        }],
        "items_in_response": 2
    }
}
                
Return a list of public channels matching a specified term
  • {:search} - term used to search channels
    Example value: "console"
cURL request example
                    curl -i -H "Accept: application/json" \
                        "https://services.sapo.pt/IPTV/MEO/Kanal/api/channels?q=console"
                
Response example
{
    "success": true,
    "message": "Channels List",
    "http_code": 200,
    "data": {
        "channels": [{
            "channel_id": "269",
            "channel_number": "549008",
            "title": "GameOver",
            "short_title": "GameOver",
            "description": "Tudo sobre videojogos: os trailers mais recentes, entrevistas e reportagens sobre os teus jogos e consolas favoritos.\n\nVê mais em gameover.sapo.pt",
            "privacy": "public",
            "category_id": "2",
            "category": "Entretenimento e Humor",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/06/138/269/logo14c075eebd8780050d03550898165309-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/06/138/269/iconacecd3100d54a56486109303471fff47-50x50.png",
            "district_id": "0",
            "district": null,
            "municipality_id": "0",
            "municipality": null,
            "state": "enabled"
        }, {
            "channel_id": "270",
            "channel_number": "549003",
            "title": "SAPO Cinema",
            "short_title": "cinema",
            "description": "Os trailers mais recentes, as reportagens e entrevistas sobre as estreias em Portugal, tudo no SAPO Cinema.",
            "privacy": "public",
            "category_id": "2",
            "category": "Entretenimento e Humor",
            "logo": "http://cdn.nexttv.sapo.pt/user/channels/39/059/270/logo83d481a47b39035bdceea6c72458e7fc-500x500.png",
            "icon": "http://cdn.nexttv.sapo.pt/user/channels/39/059/270/icon80d0d40dddb4a5ddcc18e81147893adf-50x50.png",
            "district_id": "0",
            "district": null,
            "municipality_id": "0",
            "municipality": null,
            "state": "enabled"
        }],
        "limit": 2,
        "offset": 0,
        "items_total": 100,
        "items_in_response": 2
    }
}
                
Fale connosco