{"id":26863,"date":"2026-04-07T05:58:07","date_gmt":"2026-04-07T05:58:07","guid":{"rendered":"https:\/\/www.samco.in\/help-support\/?post_type=ht_kb&#038;p=26863"},"modified":"2026-04-07T05:58:30","modified_gmt":"2026-04-07T05:58:30","slug":"how-do-i-generate-api-keys-and-authentication-tokens","status":"publish","type":"ht_kb","link":"https:\/\/www.samco.in\/help-support\/article\/how-do-i-generate-api-keys-and-authentication-tokens\/","title":{"rendered":"How do I generate API keys and authentication tokens?"},"content":{"rendered":"\n<p>Once the Trade API is activated from your Samco Star back office, your API credentials become available through the same portal. The authentication flow works as follows:<\/p>\n\n\n\n<ol><li>Use your Samco login credentials to request a session token via the login endpoint<\/li><li>The API returns a session token on successful authentication<\/li><li>Pass this token as a header with every subsequent API call to verify your identity<\/li><\/ol>\n\n\n\n<p>Tokens expire at the end of each trading session, so your script needs to re-authenticate at the start of each new trading day. This keeps your account access secure, no one can reuse an old token from a previous session.<\/p>\n\n\n\n<p>If you ever need to reset or regenerate your credentials, that can be done from within the Samco Star back office without contacting support.&nbsp;<\/p>\n","protected":false},"author":65,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":[],"ht_kb_category":[2897],"ht_kb_tag":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/ht_kb\/26863"}],"collection":[{"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/comments?post=26863"}],"version-history":[{"count":1,"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/ht_kb\/26863\/revisions"}],"predecessor-version":[{"id":26865,"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/ht_kb\/26863\/revisions\/26865"}],"wp:attachment":[{"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/media?parent=26863"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/ht_kb_category?post=26863"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.samco.in\/help-support\/wp-json\/wp\/v2\/ht_kb_tag?post=26863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}