loader2
Login Open ICICI 3-in-1 Account

Open ICICI
3-in-1 Account

Manage your Savings, Demat and Trading Account conveniently at one place

+91

How to Generate Session Key ?

7 Mins 18 Feb 2022 0 COMMENT

What is a Session Key?

A session key is a temporary key that is only used once, during one stretch of time, for encrypting and decrypting data. This is similar to a password that someone has to reset every time they login and helps in encrypting a communication session for each app separately. This key or token expires in 24 hours after generation or at midnight.

How can you generate your Session Key?

  1. Login with your ICICIdirect Account on https://api.icicidirect.com/apiuser/home and then navigate to ‘View Apps’
  2. Locate the app for which you want to generate the Session Token and copy its API Key
  3. Open a new tab and navigate to any URL encoding service you like. For the purpose of this example, we use https://www.urlencoder.org. To use this site, paste your API Key in the upper text box, click “>ENCODE
  4. Open a new tab, and switch to Developer Tools (on Chrome, Firefox, and Edge use the keyboard shortcut: Ctrl+Shift+I)
  5. In the address bar type “https://api.icicidirect.com/apiuser/login?api_key=” (without the quotes) and append your Encoded API Key (from Step 3), and press Enter.
  6. Give ICICIdirect account credentials as usual and submit.
  7. In the Network Log table, find the resource with the same name as the redirect URL you gave when creating the app. For example, if you gave the redirect URL as https://127.0.0.1:9080/api, look for a row named “127.0.0.1”.Click the row and in the new split, click tab named “Payload”>”Form Data”>”API_Session”.

Against “API_Session” will be an alpha-numeric (could be only numbers or only alphabets) token. This is your Sesssion Key for that app.

What is an SDK?

SDK stands for software development kit or devkit for short. SDK tools will include a variety of things, including libraries, documentation, code samples, processes, and guides. These can be used by developers to integrate into the apps they want to create.

How to install Breeze API’s Python SDK?

To make it easier to call Breeze API without having to code for http requests and responses and get started with Breeze API right away, we developed a Python SDK (Software Development Kit) for it.

To install the SDK, open your terminal (on Linux or Mac) or command prompt (on Windows), and first make sure you are using Python version 3.6 or above. You can do this with the “python --version” command, which will simply return a message like “Python X.Y.Z”, where X.Y.Z represent the version number, like 3.9.6.

Once sure that your Python version is 3.6+, give the “pip install --upgrade breeze-connect” command, which installs Breeze API’s SDK on your system, or upgrades it if you have an older version already installed. You can check your SDK version with the “pip show breeze-connect” command, and check the latest release as well as updated sample code on https://www.pypi.org/project/breeze-connect/.

Disclaimer: -  ICICI Securities Ltd. ( I-Sec). Registered office of I-Sec is at ICICI Securities Ltd. - ICICI Venture House, Appasaheb Marathe Marg, Prabhadevi, Mumbai - 400 025, India, Tel No : 022 - 6807 7100. I-Sec is a Member of National Stock Exchange of India Ltd (Member Code:-07730) and BSE Ltd (Member Code :103) and Member of Multi Commodity Exchange of India Ltd. ( Member Code : 56250) and having SEBI registration no. INZ000183631. I-Sec is a SEBI registered with SEBI as a Research Analyst vide registration no. INH000000990. Name of the Compliance officer (broking): Mr. Anoop Goyal, Contact number: 022-40701000, E-mail address: complianceofficer@icicisecurities.com. Investment in securities market are subject to market risks, read all the related documents carefully before investing. The non-broking products / services like Mutual Funds, Insurance, FD/ Bonds, loans, PMS, Tax, Elocker, NPS, IPO, Research, Financial Learning etc. are not exchange traded products / services and ICICI Securities Ltd. is just acting as a distributor/ referral Agent of such products / services and all disputes with respect to the distribution activity would not have access to Exchange investor redressal or Arbitration mechanism. The contents herein above shall not be considered as an invitation or persuasion to trade or invest.  I-Sec and affiliates accept no liabilities for any loss or damage of any kind arising out of any actions taken in reliance thereon. The contents herein above are solely for informational purpose and may not be used or considered as an offer document or solicitation of offer to buy or sell or subscribe for securities or other financial instruments or any other product. Investors should consult their financial advisers whether the product is suitable for them before taking any decision. The contents herein mentioned are solely for informational and educational purpose.

API facilities are offered to the clients as per the terms and condition to be agreed by the client.