General API Guidelines and Examples
General API Guidelines and Examples
With the Validate ID based services, there are several request options that provide flexibility in controlling the flow of the service. One of the main options is to elect to have IDmission’s Team of identity Experts perform a manual review. If this option is selected, it will be important to refer to the POST Processing API for the webhook that will provide the results. If this option is not utilized, the standard response will provide you with the results and extracted ID data.
Code Examples Python
import urllib.request
import ssl
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
requestString = "Your Request"
url = 'Your URL'
f = urllib.request.urlopen(url, data = bytes(requestString, 'utf-8'), context = ctx)
resp = f.read().decode('utf-8')
print("" + resp)
Code Examples Java
>"Note: Before using the preceding code, please verify that TLS1.2 support is already added
to the JVM ( -Dhttps.protocols=TLSv1, TLSv1.1, TLSv1.2)."
public static String submitRequest(String url, String requestJson) {
String exceptionCode = "";
String exceptionStatusMsg = "";
String resp = "";
SSLContext sslContext = null;
HttpURLConnection httpConn = null;
try {
URL urlObj = new URL(url);
URLConnection conn = urlObj.openConnection();
httpConn = (HttpURLConnection) conn;
httpConn.setRequestMethod("POST");
int readTimeout = 15 * 1000;
int connTimeout = 1000;
// logger.info(" ReadTimeout >>" + readTimeout +
// "<< connTimeout >> " + connTimeout);
httpConn.setConnectTimeout(connTimeout);
httpConn.setReadTimeout(readTimeout);
httpConn.setDoInput(true);
// logger.info(" Host url >>" + url);
httpConn.setDoOutput(true);
httpConn.setRequestProperty("Content-Type", "application/json; charset=utf-8");
OutputStream outStream = httpConn.getOutputStream();
outStream.write(requestJson.getBytes());
outStream.close();
InputStream inStream = httpConn.getInputStream();
ByteArrayOutputStream respBytes = new ByteArrayOutputStream();
//use ioutil.transfer
transfer(inStream, respBytes, false, 1024);
resp = new String(respBytes.toByteArray());
} catch (Exception e) {
// logger.error("Error while using processing", respe);
e.printStackTrace();
}
return resp;
}
Code Examples csharp
public static String postRequest(String url, String requestJson)
{
String resp = null;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
byte[] requestBytes = System.Text.Encoding.UTF8.GetBytes(requestJson);
request.ContentType = "application/json; encoding='utf-8'";
request.ContentLength = requestBytes.Length;
request.Method = "POST";
Stream requestStream = request.GetRequestStream();
requestStream.Write(requestBytes, 0, requestBytes.Length);
requestStream.Close();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();;
if (response.StatusCode == HttpStatusCode.OK)
{
Stream responseStream = response.GetResponseStream();
string responseStr = new StreamReader(responseStream).ReadToEnd();
return responseStr;
}
return resp;
}
Certification
Certification URL for API: To submit the application, use the following link: https://identity.idmission.com/IDS/service/integ/idm/thirdparty/upsert
Note: Follow the examples in the subsequent sections as a guide to the IDentity API Services.
Report a docs issue
Copy this context into your team’s issue tracker or an email to support@idmission.com.
