Snippets

ESTI design Auth requests app-gw

Created by Robert Poz last modified

LOGIN

curl 'http://watch.polishtvcompany.com/app-gw/sandbox/login' --data 'login=r_pozoga%40estidesign.com&password=esti%2C31337'

RESPONSE

{"auth_token":"deed3ca6ad09f544b67c0c7f0e2b2928"}

TOKEN SHOULD BE BASE64 ENCODED!

token=$(echo -n "deed3ca6ad09f544b67c0c7f0e2b2928" |base64) ;

SERVICES

curl 'http://watch.polishtvcompany.com/app-gw/sessions' -H "Authorization: Basic $token" --Data 'service_id=5'

RESPONSE

[{"service_id":5,"group_code":"pl","name":"Polska TV Premium","service_name":"polish","company_id":2,"app_url_path":"new/index.html","app_icon_path":"http://207.110.52.34/service_icons/new/polish_152x152.png","app_main_lang":"pl","active":true,"expires_at":"2019-03-20T13:39:57.000-04:00","trial_sku":"Services:IPTVServices:Polska:Premium:3DaysPremiumPolska","company":{"id":2,"name":"Polish TV Company"}},{"service_id":13,"group_code":"pl","name":"Polska TV Family","service_name":"polskatv_family","company_id":2,"app_url_path":"new/index.html","app_icon_path":"http://207.110.52.34/service_icons/new/polskatv_family_152x152.png","app_main_lang":"pl","active":true,"expires_at":"2018-08-06T03:00:07.000-04:00","trial_sku":"Services:IPTVServices:Polska:Family:3DaysFamilyPolska","company":{"id":2,"name":"Polish TV Company"}},{"service_id":24,"group_code":"pl","name":"Polish Basic","service_name":"polska_basic","company_id":2,"app_url_path":"new/index.html","app_icon_path":"http://207.110.52.34/service_icons/new/polska_basic_152x152.png","app_main_lang":"en","active":false,"expires_at":null,"trial_sku":"Services:IPTVServices:Polska:Basic:3DaysBasicPolska","company":{"id":2,"name":"Polish TV Company"}},{"service_id":48,"group_code":"pl","name":"Polish Plus","service_name":"polishtv_plus","company_id":2,"app_url_path":"new/index.html","app_icon_path":"http://207.110.52.34/service_icons/new/polishtv_plus_152x152.png","app_main_lang":"pl","active":false,"expires_at":null,"trial_sku":"Services:IPTVServices:Polska:PLUS POLSKA:3DaysPlusPolska","company":{"id":2,"name":"Polish TV Company"}}]

SESSION

curl 'http://watch.polishtvcompany.com/app-gw/sessions' -H 'Authorization: Basic $token' --data 'service_id=5'

RESPONSE

{"credentials":{"login":"95891378d6554fec","password":"e760998fe142e81a"},"settings":{"timeshift":0,"pcode":"1","custom_session_duration":180},"pcodes":[],"subscription_id":14874,"session_token":"95891378d6554fece760998fe142e81a","created_at":"2018-06-27T00:35:46.654-04:00","expires_at":"2018-06-27T03:38:46.651-04:00","success":true,"service_id":5,"endpoint":"207.110.52.34","api_type":"INTERNAL","duration":10979.980767126,"static":false,"lang":"pl","vod_available":true,"icon_url":"http://207.110.52.34/service_icons/new/polish_152x152.png","company":{"id":2,"name":"Polish TV Company"}}

After session request you use login and password for INTERNAL service, concatenate both to form sesssion token. From the response abovde you will have:

login + password = access_token = 95891378d6554fece760998fe142e81a

Right?

Then you form request to authenticate with IPTV endpoint:

curl 'http://207.110.52.34/apiv2/token?session_token=<YOUR_SESSION_TOKEN>&settings=all&' --compressed

For the example above it would be:

url 'http://207.110.52.34/apiv2/token?session_token=90ded80853403b7df6d710fcde3a4af1&settings=all&'

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.