درگاه احراز هویت آنلاین

مشاهده سرویس ها

سرویس های هوش مصنوعی

مشاهده سرویس ها

سرویس های استعلامی

مشاهده سرویس ها

سرویس های احراز هویت

مشاهده سرویس ها

صدور امضا دیجیتال

مشاهده سرویس ها

استعلام اطلاعات شرکت

مشاهده سرویس ها

سرویس نئوبانک

مشاهده سرویس ها

سجام آنلاین

بزودی

شارژ و بسته اینترنتی

بزودی

کارگر و کارفرما

بزودی

قوه قضائیه هوشمند

بزودی

سرویس دریافت توکن



برای فراخوانی این سرویس مراحل زیر را طی کنید:
۱-متد فراخوانی سرویس POST می باشد.


  https://api.itsaaz.ir/identity/token
        

  Post
        

  Content-Type: application/x-www-form-urlencoded
        

  grant_type= "password" 
  client_id= "ekyc"
  Client_secret= "f63026a9-912d-8978-ac80-4ae5d63db1ac" 
  username= "test"
  password= "t_86574213@T"
        

  {
    "access_token": "توکن",
    "expires_in": مدت استفاده,
    "token_type": "نوع توکن",
    "refresh_token": "رفرش توکن",
    "scope": "محدوده"
  }   
        

پارامترهای ورودی

ردیف پارامتر ورودی نوع ورودی توضیحات
1 Grant_type String
2 Client_id String
3 Client_secret String
4 username String
4 password String

نمونه کد


  var client = new RestClient("https://api.itsaaz.ir/identity/token");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
  request.AddParameter("grant_type", "password");
  request.AddParameter("client_id", "test");
  request.AddParameter("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f");
  request.AddParameter("username", "test");
  request.AddParameter("password", "t_86574213@H");
  IRestResponse response = client.Execute(request);
  Console.WriteLine(response.Content);
        

  curl --location --request POST 'https://api.itsaaz.ir/identity/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=password' \
  --data-urlencode 'client_id=test' \
  --data-urlencode 'Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f' \
  --data-urlencode 'username=test' \
  --data-urlencode 'password=t_86574213@H'
        

  var headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  };
  var request = http.Request('POST', Uri.parse('https://api.itsaaz.ir/identity/token'));
  request.bodyFields = {
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H'
  };
  request.headers.addAll(headers);
  
  http.StreamedResponse response = await request.send();
  
  if (response.statusCode == 200) {
    print(await response.stream.bytesToString());
  }
  else {
    print(response.reasonPhrase);
  }
          
        

  package main

  import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
  )
  
  func main() {
  
    url := "https://api.itsaaz.ir/identity/token"
    method := "POST"
  
    payload := strings.NewReader("grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H")
  
    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)
  
    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
  
    res, err := client.Do(req)
    if err != nil {
      fmt.Println(err)
      return
    }
    defer res.Body.Close()
  
    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
      fmt.Println(err)
      return
    }
    fmt.Println(string(body))
  }
        

  POST /identity/token HTTP/1.1
  Host: api.itsaaz.ir
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 123
  
  grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H
        

    OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
  RequestBody body = RequestBody.create(mediaType, "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213@H");
  Request request = new Request.Builder()
    .url("https://api.itsaaz.ir/identity/token")
    .method("POST", body)
    .addHeader("Content-Type", "application/x-www-form-urlencoded")
    .build();
  Response response = client.newCall(request).execute();

            

  Unirest.setTimeouts(0, 0);
  HttpResponse<String> response = Unirest.post("https://api.itsaaz.ir/identity/token")
    .header("Content-Type", "application/x-www-form-urlencoded")
    .field("grant_type", "password")
    .field("client_id", "test")
    .field("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f")
    .field("username", "test")
    .field("password", "t_86574213@H")
    .asString();
  
  
            

  var myHeaders = new Headers();
  myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
  
  var urlencoded = new URLSearchParams();
  urlencoded.append("grant_type", "password");
  urlencoded.append("client_id", "test");
  urlencoded.append("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f");
  urlencoded.append("username", "test");
  urlencoded.append("password", "t_86574213@H");
  
  var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: urlencoded,
    redirect: 'follow'
  };
  
  fetch("https://api.itsaaz.ir/identity/token", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
            

  var settings = {
    "url": "https://api.itsaaz.ir/identity/token",
    "method": "POST",
    "timeout": 0,
    "headers": {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    "data": {
      "grant_type": "password",
      "client_id": "test",
      "Client_secret": "66c0af3a-ff89-8390-3b07-cf88a25e5f3f",
      "username": "test",
      "password": "t_86574213@H"
    }
  };

  $.ajax(settings).done(function (response) {
    console.log(response);
  });
            

  var data = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";

  var xhr = new XMLHttpRequest();
  xhr.withCredentials = true;
  
  xhr.addEventListener("readystatechange", function() {
    if(this.readyState === 4) {
      console.log(this.responseText);
    }
  });
  
  xhr.open("POST", "https://api.itsaaz.ir/identity/token");
  xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  
  xhr.send(data);
            

  CURL *curl;
  CURLcode res;
  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_URL, "https://api.itsaaz.ir/identity/token");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
    struct curl_slist *headers = NULL;
    headers = curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    const char *data = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
    res = curl_easy_perform(curl);
  }
  curl_easy_cleanup(curl);
  

        

  var axios = require('axios');
  var qs = require('qs');
  var data = qs.stringify({
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H' 
  });
  var config = {
    method: 'post',
    url: 'https://api.itsaaz.ir/identity/token',
    headers: { 
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data : data
  };
  
  axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data));
  })
  .catch(function (error) {
    console.log(error);
  });
  
  
            

  var https = require('follow-redirects').https;
  var fs = require('fs');
  
  var qs = require('querystring');
  
  var options = {
    'method': 'POST',
    'hostname': 'api.itsaaz.ir',
    'path': '/identity/token',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    'maxRedirects': 20
  };
  
  var req = https.request(options, function (res) {
    var chunks = [];
  
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
  
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  
    res.on("error", function (error) {
      console.error(error);
    });
  });
  
  var postData = qs.stringify({
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H'
  });
  
  req.write(postData);
  
  req.end();
            

  var request = require('request');
  var options = {
    'method': 'POST',
    'url': 'https://api.itsaaz.ir/identity/token',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
      'grant_type': 'password',
      'client_id': 'test',
      'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
      'username': 'test',
      'password': 't_86574213@H'
    }
  };
  request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
  });
  
  
            

  var unirest = require('unirest');
  var req = unirest('POST', 'https://api.itsaaz.ir/identity/token')
    .headers({
      'Content-Type': 'application/x-www-form-urlencoded'
    })
    .send('grant_type=password')
    .send('client_id=test')
    .send('Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f')
    .send('username=test')
    .send('password=t_86574213@H')
    .end(function (res) { 
      if (res.error) throw new Error(res.error); 
      console.log(res.raw_body);
    });
  
  
            

  #import <Foundation/Foundation.h>

  dispatch_semaphore_t sema = dispatch_semaphore_create(0);
  
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.itsaaz.ir/identity/token"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
  NSDictionary *headers = @{
    @"Content-Type": @"application/x-www-form-urlencoded"
  };
  
  [request setAllHTTPHeaderFields:headers];
  NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"grant_type=password" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&client_id=test" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&username=test" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&password=t_86574213@H" dataUsingEncoding:NSUTF8StringEncoding]];
  [request setHTTPBody:postData];
  
  [request setHTTPMethod:@"POST"];
  
  NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
  completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
    if (error) {
      NSLog(@"%@", error);
      dispatch_semaphore_signal(sema);
    } else {
      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
      NSError *parseError = nil;
      NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
      NSLog(@"%@",responseDictionary);
      dispatch_semaphore_signal(sema);
    }
  }];
  [dataTask resume];
  dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);     
        

  open Lwt
  open Cohttp
  open Cohttp_lwt_unix

  let postData = ref "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";;
  
  let reqBody = 
    let uri = Uri.of_string "https://api.itsaaz.ir/identity/token" in
    let headers = Header.init ()
      |> fun h -> Header.add h "Content-Type" "application/x-www-form-urlencoded"
    in
    let body = Cohttp_lwt.Body.of_string !postData in
  
    Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
    body |> Cohttp_lwt.Body.to_string >|= fun body -> body
  
  let () =
    let respBody = Lwt_main.run reqBody in
    print_endline (respBody)
        

  <?php

  $curl = curl_init();
  
  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.itsaaz.ir/identity/token',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H',
    CURLOPT_HTTPHEADER => array(
      'Content-Type: application/x-www-form-urlencoded'
    ),
  ));
  
  $response = curl_exec($curl);
  
  curl_close($curl);
  echo $response;
  
            

  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.itsaaz.ir/identity/token');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
  ));
  $request->addPostParameter(array(
    'grant_type' => 'password',
    'client_id' => 'test',
    'Client_secret' => '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username' => 'test',
    'password' => 't_86574213@H'
  ));
  try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
      echo $response->getBody();
    }
    else {
      echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
      $response->getReasonPhrase();
    }
  }
  catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
  }
            

  <?php
  $client = new http\Client;
  $request = new http\Client\Request;
  $request->setRequestUrl('https://api.itsaaz.ir/identity/token');
  $request->setRequestMethod('POST');
  $body = new http\Message\Body;
  $body->append(new http\QueryString(array(
    'grant_type' => 'password',
    'client_id' => 'test',
    'Client_secret' => '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username' => 'test',
    'password' => 't_86574213@H')));$request->setBody($body);
  $request->setOptions(array());
  $request->setHeaders(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
  ));
  $client->enqueue($request)->send();
  $response = $client->getResponse();
  echo $response->getBody();
  
            

  $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
  $headers.Add("Content-Type", "application/x-www-form-urlencoded")

  $body = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"

  $response = Invoke-RestMethod 'https://api.itsaaz.ir/identity/token' -Method 'POST' -Headers $headers -Body $body
  $response | ConvertTo-Json
        

  import http.client

  conn = http.client.HTTPSConnection("api.itsaaz.ir")
  payload = 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H'
  headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
  conn.request("POST", "/identity/token", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
            

  import requests

  url = "https://api.itsaaz.ir/identity/token"

  payload='grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H'
  headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }

  response = requests.request("POST", url, headers=headers, data=payload)

  print(response.text)

            

  require "uri"
  require "net/http"

  url = URI("https://api.itsaaz.ir/identity/token")

  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true

  request = Net::HTTP::Post.new(url)
  request["Content-Type"] = "application/x-www-form-urlencoded"
  request.body = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"

  response = https.request(request)
  puts response.read_body
      
        

  http --ignore-stdin --form --follow --timeout 3600 POST 'https://api.itsaaz.ir/identity/token' \
  'grant_type'='password' \
  'client_id'='test' \
  'Client_secret'='66c0af3a-ff89-8390-3b07-cf88a25e5f3f' \
  'username'='test' \
  'password'='t_86574213@H' \
  Content-Type:'application/x-www-form-urlencoded'
            

  wget --no-check-certificate --quiet \
    --method POST \
    --timeout=0 \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --body-data 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H' \
    'https://api.itsaaz.ir/identity/token'
            

  import Foundation
  #if canImport(FoundationNetworking)
  import FoundationNetworking
  #endif

  var semaphore = DispatchSemaphore (value: 0)

  let parameters = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"
  let postData =  parameters.data(using: .utf8)

  var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/identity/token")!,timeoutInterval: Double.infinity)
  request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")

  request.httpMethod = "POST"
  request.httpBody = postData

  let task = URLSession.shared.dataTask(with: request) { data, response, error in 
    guard let data = data else {
      print(String(describing: error))
      semaphore.signal()
      return
    }
    print(String(data: data, encoding: .utf8)!)
    semaphore.signal()
  }

  task.resume()
  semaphore.wait()
      
        


سرویس دریافت اطلاعات اعتبارسنجی:



۱-متد فراخوانی سرویس POST می باشد.
2- پس از فراخوانی سرویس، اطلاعات کاربر مطابق آنچه در جدول پارامتر های خروجی نمایش داده شده است، ارسال می شود.

https://api.itsaaz.ir/ai/etebar/info




خروجی دریافتی

{
  "data": {
    "reportSource": 0,
    "totalPrice": 0,
    "hasReport": true,
    "reportIsGeneratedPast24Hours": true,
    "payUrl": "string",
    "payInfo": "string",
    "isSucceed": true
  },
  "meta": "string",
  "error": {
    "errorCode": 0,
    "customMessage": "string",
    "exception": "string"
  }
}



پارامترهای ورودی

ردیف پارامتر ورودی نوع ورودی توضیحات
1 NationalCode String کدملی
2 Cellphone String شماره همراه

پارامترهای خروجی

ردیف پارامتر خروجی نوع خروجی توضیحات
1 payUrl String لینک پرداخت
2 payInfo String اطلاعات پرداخت