SciTools Plus API overview

With IDT SciToolsTM Plus API you can incorporate our oligos, gene analysis, and design services into your own design pipeline applications. You can also use the API to access your orders, invoices, and payment information. These services authenticate through OAuth and require an IDT account for you to obtain an API key. Once you finish setting up authentication, you can explore services through Swagger or our Postman collection and begin developing your integrations.

Getting started

First time setup—Generating credentials

  1. Sign in or create a new IDT account here.
  2. Go to your user name drop down menu at the top right of the page, and select My account.
  3. Click the API access link.
  4. Click the Request new API key button.
  5. In the Create new client dialog, enter a unique Client ID and Client description. Note: keep these values secure, as they could be used by others to access data related to your IDT purchases.
  6. Check the box to accept the API terms and conditions, and click the Submit button.
    • Your API Client secret will be generated and displayed alongside the Client ID and Client description you provided.
    • Your Client ID and Client secret will be used as parameters in the call to our authentication service to obtain a bearer token that can be used to authenticate all other API requests.

Authentication—Generating an access token

To help users begin integrating with our API, here are examples of retrieving an access token from our OAuth authentication endpoint. An access token will then be used to authorize requests to the remaining API endpoints for its duration. The first example uses the popular Python programming language, and the second uses the popular cURL utility available through most command-line interfaces.

Both examples are based on code generated using the Postman tool using our Postman collection.

from __future__ import print_function
from base64 import b64encode
import json
from urllib import request, parse


def get_access_token(client_id, client_secret, idt_username, idt_password):
    """
    Create the HTTP request, transmit it, and then parse the response for the 
    access token.
    
    The body_dict will also contain the fields "expires_in" that provides the 
    time window the token is valid for (in seconds) and "token_type".
    """

    # Construct the HTTP request
    authorization_string = b64encode(bytes(client_id + ":" + client_secret, "utf-8")).decode()
    request_headers = { "Content-Type" : "application/x-www-form-urlencoded",
                        "Authorization" : "Basic " + authorization_string }
                    
    data_dict = {   "grant_type" : "password",
                    "scope" : "test",
                    "username" : idt_username,
                    "password" : idt_password }
    request_data = parse.urlencode(data_dict).encode()

    post_request = request.Request("https://www.idtdna.com/Identityserver/connect/token", 
                                    data = request_data, 
                                    headers = request_headers,
                                    method = "POST")

    # Transmit the HTTP request and get HTTP response
    response = request.urlopen(post_request)

    # Process the HTTP response for the desired data
    body = response.read().decode()
    
    # Error and return the response from the endpoint if there was a problem
    if (response.status != 200):
        raise RuntimeError("Request failed with error code:" + response.status + "\nBody:\n" + body)
    
    body_dict = json.loads(body)
    return body_dict["access_token"]
    
    
if __name__ == "__main__":
    client_id = "client_id_here"
    client_secret = "client_secret_here"
    idt_username = "IDT_username_here"
    idt_password = "IDT_password_here"
    
    token = get_access_token(client_id, client_secret, idt_username, idt_password)
    print(token)

curl --location --request POST 'https://www.idtdna.com/Identityserver/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
-u client_id_here:client_secret_here \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=idt_account_here' \
--data-urlencode 'password=idt_account_password_here' \
--data-urlencode 'scope=test'
                

Explore the API endpoints

You can explore and interact with the API via Swagger.

For further exploration and integration help we also provide a Postman collection showing sample calls and the JSON output returned. We highly recommend that you import the collection into the free Postman tool. The collection should assist as a known good reference for debugging, and also allows users to generate sample code for each endpoint in a variety of programming languages for use in your applications.

As part of our mission to serve our customers in advancing their research, IDT makes these services freely available to account holders for authorized use per our terms and conditions. Please review the API terms and conditions before you begin.

Please note—we limit the use of the APIs to a maximum of 500 calls per minute. If you have tested a use case that is approaching or exceeds calls at a rate above that limit, please contact IDT support with details at api@idtdna.com

Your feedback is valuable to us and will help to improve the SciTools Plus API. Please fill out our survey.

Start survey

*RUO—For research use only. Not for use in diagnostic procedures. Unless otherwise agreed to in writing, IDT does not intend for these products to be used in clinical applications and does not warrant their fitness or suitability for any clinical diagnostic use. Purchaser is solely responsible for all decisions regarding the use of these products and any associated regulatory or legal obligations.

 

RUO22-1053_002