Authentication

SmartClass User Authentication API

get
Authentication

https://schoolid.smartclass.school/public/v1/authentication
This endpoint allows you to get free cakes.
Request
Response
Headers
Authorization
required
string
Authorization Token
schoolId
required
string
School ID of the Authorization Token
Query Parameters
userId
required
string
User ID of the user who will be authenticated.
userPassword
required
string
User Password of the user who will be authenticated.
200: OK
Successful Response
{
"message": {
"success": "Başarılı bir şekilde giriş yapıldı."
},
"redirect": "../headquarters/index.php"
}
401: Unauthorized
{
"message": {
"error": "Kullanıcı ID veya şifre hatalı! Lütfen bilgilerinizi kontrol ederek tekrar deneyiniz."
}
}
cURL
jQuery
PHP
Ruby
Python Requests
Node.js
Go
C#
curl -X GET \
'https://development.smartclass.technology/public/v1/authentication?userId=xxx&userPassword=xxx' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTU4ODcwMTU1fQ.c3pgvLKqqrGQTWOASriiIU8czlBAzrujw5hcuiogJC4' \
-H 'Cache-Control: no-cache' \
-H 'schoolId: 11'
var settings = {
"async": true,
"crossDomain": true,
"url": "https://development.smartclass.technology/public/v1/authentication?userId=xxx&userPassword=xxx",
"method": "GET",
"headers": {
"schoolId": "11",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTU4ODcwMTU1fQ.c3pgvLKqqrGQTWOASriiIU8czlBAzrujw5hcuiogJC4",
"Cache-Control": "no-cache",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://development.smartclass.technology/public/v1/authentication?userId=xxx&userPassword=xxx",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTU4ODcwMTU1fQ.c3pgvLKqqrGQTWOASriiIU8czlBAzrujw5hcuiogJC4",
"Cache-Control: no-cache",
"schoolId: 11"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
require 'uri'
require 'net/http'
url = URI("https://development.smartclass.technology/public/v1/authentication?userId=xxx&userPassword=xxx")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["schoolId"] = '11'
request["Authorization"] = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTU4ODcwMTU1fQ.c3pgvLKqqrGQTWOASriiIU8czlBAzrujw5hcuiogJC4'
request["Cache-Control"] = 'no-cache'
response = http.request(request)
puts response.read_body
import requests
url = "https://development.smartclass.technology/public/v1/authentication"
querystring = {"userId":"xxx","userPassword":"xxx"}
headers = {
'schoolId': "11",
'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTU4ODcwMTU1fQ.c3pgvLKqqrGQTWOASriiIU8czlBAzrujw5hcuiogJC4",
'Cache-Control': "no-cache",
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
var http = require("https");
var options = {
"method": "GET",
"hostname": [
"demo",
"smartclass",
"technology"
],
"path": [
"public",
"v1",
"authentication"
],
"headers": {
"schoolId": "11",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTU4ODcwMTU1fQ.c3pgvLKqqrGQTWOASriiIU8czlBAzrujw5hcuiogJC4",
"Cache-Control": "no-cache",
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://development.smartclass.technology/public/v1/authentication?userId=xxx&userPassword=xxx"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("schoolId", "11")
req.Header.Add("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTU4ODcwMTU1fQ.c3pgvLKqqrGQTWOASriiIU8czlBAzrujw5hcuiogJC4")
req.Header.Add("Cache-Control", "no-cache")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
var client = new RestClient("https://development.smartclass.technology/public/v1/authentication?userId=xxx&userPassword=xxx");
var request = new RestRequest(Method.GET);
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTU4ODcwMTU1fQ.c3pgvLKqqrGQTWOASriiIU8czlBAzrujw5hcuiogJC4");
request.AddHeader("schoolId", "11");
IRestResponse response = client.Execute(request);