Authentication
Generate Connection Portal URL
Authenticates a SnapTrade user and returns the Connection Portal URL used for connecting brokerage accounts. Please check this guide for how to integrate the Connection Portal into your app.
Please note that the returned URL expires in 5 minutes.
post/snapTrade/login
Query parameters
userIdstring required
SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
Example:snaptrade-user-123
userSecretstring required
SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the rotate user secret endpoint.
Example:adf2aa34-8219-40f7-a6b3-60156985cc61
Request body
Example request
{
"broker": "ALPACA",
"immediateRedirect": true,
"customRedirect": "https://snaptrade.com",
"reconnect": "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
"showCloseButton": true,
"darkMode": true,
"connectionPortalVersion": "v4"
}Response
OK
Example response
{
"redirectURI": "https://app.snaptrade.com/snapTrade/redeemToken?token=npVKchZrL0MYIHTusGfADT74r4xXpHkmbxbQDmt0RINLXbQ5cWsvGkPSgMQRxz8/cnxjzL9T2NWLuHuDyidHiCNeXXTb/tVhzC2olSyfxWW6DRrkUppArGCdmkIHyBMzog6C55P8yoqzcGer5Hml0Q%3D%3D&clientId=WEALTHLY&broker=ROBINHOOD&connectionPortalVersion=v4&sessionId=cf371bb4-a475-4f17-ab94-d0fee699960d",
"sessionId": "cf371bb4-a475-4f17-ab94-d0fee699960d"
}