Otomatik Giriş

Dashboard ekranına otomatik giriş yapmak için kullanılacak servistir.

POST https://api.zotlo.com/v1/dashboard/autologin
Bu servisten gelen loginUrl değeri ile dashboard ekranina giriş yapılabilmektedir.
Bu servis POST metoduyla çalışır. Abone ait bilgilerin çekilebilmesi için subscriberId veya email parametresinin gönderilmesi zorunludur.

Dashboard otomatik login servisi için asagidaki parametrelerden bir tanesinin gonderilmesi zorunludur.

Alan
Açıklama
subscriberId
Aboneye ait bilgilerin çekilebilmesi için gereklidir
email
Aboneye ait bilgilerin çekilebilmesi için gereklidir
Curl
Php
Swift
Java
Python
C#
1
curl --location --request POST 'https://api.zotlo.com/dashboard/autologin' \
2
--header 'AccessKey: ****' \
3
--header 'AccessSecret: ***' \
4
--header 'ApplicationId: *' \
5
--header 'Content-Type: application/json' \
6
--header 'Language: en' \
7
--data-raw '{
8
"email": "email adresi"
9
}'
Copied!
1
$curl = curl_init();
2
3
curl_setopt_array($curl, array(
4
CURLOPT_URL => 'https://api.zotlo.com/dashboard/autologin',
5
CURLOPT_RETURNTRANSFER => true,
6
CURLOPT_ENCODING => '',
7
CURLOPT_MAXREDIRS => 10,
8
CURLOPT_TIMEOUT => 0,
9
CURLOPT_FOLLOWLOCATION => true,
10
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
11
CURLOPT_CUSTOMREQUEST => 'POST',
12
CURLOPT_POSTFIELDS =>'{
13
"email": "email adresi"
14
}',
15
CURLOPT_HTTPHEADER => array(
16
'AccessKey: ****',
17
'AccessSecret: ****',
18
'ApplicationId: *',
19
'Content-Type: application/json',
20
'Language: en'
21
),
22
));
23
24
$response = curl_exec($curl);
25
26
curl_close($curl);
27
echo $response;
Copied!
1
import Foundation
2
#if canImport(FoundationNetworking)
3
import FoundationNetworking
4
#endif
5
6
var semaphore = DispatchSemaphore (value: 0)
7
8
let parameters = "{\n \"email\": \"email adresi\"\n}"
9
let postData = parameters.data(using: .utf8)
10
11
var request = URLRequest(url: URL(string: "https://api.zotlo.com/dashboard/autologin")!,timeoutInterval: Double.infinity)
12
request.addValue("****", forHTTPHeaderField: "AccessKey")
13
request.addValue("****", forHTTPHeaderField: "AccessSecret")
14
request.addValue("*", forHTTPHeaderField: "ApplicationId")
15
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
16
request.addValue("en", forHTTPHeaderField: "Language")
17
18
request.httpMethod = "POST"
19
request.httpBody = postData
20
21
let task = URLSession.shared.dataTask(with: request) { data, response, error in
22
guard let data = data else {
23
print(String(describing: error))
24
semaphore.signal()
25
return
26
}
27
print(String(data: data, encoding: .utf8)!)
28
semaphore.signal()
29
}
30
31
task.resume()
32
semaphore.wait()
Copied!
1
OkHttpClient client = new OkHttpClient().newBuilder()
2
.build();
3
MediaType mediaType = MediaType.parse("application/json");
4
RequestBody body = RequestBody.create(mediaType, "{\n \"email\": \"email adresi\"\n}");
5
Request request = new Request.Builder()
6
.url("https://api.zotlo.com/dashboard/autologin")
7
.method("POST", body)
8
.addHeader("AccessKey", "****")
9
.addHeader("AccessSecret", "****")
10
.addHeader("ApplicationId", "*")
11
.addHeader("Content-Type", "application/json")
12
.addHeader("Language", "en")
13
.build();
14
Response response = client.newCall(request).execute();
Copied!
1
import requests
2
3
url = "https://api.zotlo.com/dashboard/autologin"
4
5
payload="{\n \"email\": \"email adresi\"\n}"
6
headers = {
7
'AccessKey': '****',
8
'AccessSecret': '****',
9
'ApplicationId': '*',
10
'Content-Type': 'application/json',
11
'Language': 'en'
12
}
13
14
response = requests.request("POST", url, headers=headers, data=payload)
15
16
print(response.text)
Copied!
1
var client = new RestClient("https://api.zotlo.com/dashboard/autologin");
2
client.Timeout = -1;
3
var request = new RestRequest(Method.POST);
4
request.AddHeader("AccessKey", "****");
5
request.AddHeader("AccessSecret", "****");
6
request.AddHeader("ApplicationId", "*");
7
request.AddHeader("Content-Type", "application/json");
8
request.AddHeader("Language", "en");
9
request.AddParameter("application/json", "{\n \"email\": \"email adresi\"\n}", ParameterType.RequestBody);
10
IRestResponse response = client.Execute(request);
11
Console.WriteLine(response.Content);
Copied!

Servis Cevapları

Eğer abone bulunursa :

1
{
2
"meta": {
3
"requestId": "7198eab26992-REQ-603a582303ab7",
4
"httpStatus": 200
5
},
6
"result": {
7
"loginUrl": "https://dashboard.zotlo.com/user/autologin?h=a3472deb-a2cf-419d-8133-d4b1ee71cd28"
8
}
9
}
Copied!

Eğer abone bulunamazsa :

1
{
2
"meta": {
3
"requestId": "7198eab26992-REQ-603a5865323d3",
4
"httpStatus": 400,
5
"errorMessage": "Subscriber not found.",
6
"errorCode": "500000"
7
},
8
"result": []
9
}
Copied!

Parametreler bulunamazsa :

1
{
2
"meta": {
3
"requestId": "7198eab26992-REQ-603a588de1676",
4
"httpStatus": 400,
5
"errorMessage": "SubscriberId or Email is empty.",
6
"errorCode": "400024"
7
},
8
"result": []
9
}
Copied!

Başarılı Cevap Parametreleri

Alan
Açıklama
loginUrl
Sistem tarafından üretilen loginUrl ile giriş yapabilirsiniz.
Last modified 2mo ago