dschandra commited on
Commit
443de81
·
verified ·
1 Parent(s): ec12a93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,15 +1,14 @@
1
  import streamlit as st
2
  import requests
3
  import pandas as pd
4
- import simple_salesforce
5
 
6
  # ---------------------- CONFIG ----------------------
7
  CLIENT_ID = "3MVG9VMBZCsTL9hnfx2eVMOHa56mwSZnvuAnPr3kVVBEQfeLYvrSfJNRRjjSlKWPLy99XM6kefg=="
8
  CLIENT_SECRET = "6F7E9C95CE20CC07FC1EBD39B34909739D99975A0EEB548240926EA0686E428E"
9
  USERNAME = "[email protected]"
10
- PASSWORD = "Vedavathi@04" # Keep this as the password (without the security token)
11
  SECURITY_TOKEN = "jqe4His8AcuFJucZz5NBHfGU" # Your Salesforce Security Token
12
- TOKEN_URL = "https://login.salesforce.com/services/oauth2/token" # For production
13
  API_VERSION = "v60.0"
14
 
15
  # ---------------------- AUTH ----------------------
@@ -20,7 +19,7 @@ def get_salesforce_token():
20
  "client_id": CLIENT_ID,
21
  "client_secret": CLIENT_SECRET,
22
  "username": USERNAME,
23
- "password": PASSWORD + SECURITY_TOKEN # Correctly concatenate password and security token
24
  }
25
  response = requests.post(TOKEN_URL, data=data)
26
 
 
1
  import streamlit as st
2
  import requests
3
  import pandas as pd
 
4
 
5
  # ---------------------- CONFIG ----------------------
6
  CLIENT_ID = "3MVG9VMBZCsTL9hnfx2eVMOHa56mwSZnvuAnPr3kVVBEQfeLYvrSfJNRRjjSlKWPLy99XM6kefg=="
7
  CLIENT_SECRET = "6F7E9C95CE20CC07FC1EBD39B34909739D99975A0EEB548240926EA0686E428E"
8
  USERNAME = "[email protected]"
9
+ PASSWORD = "Vedavathi@04" # Ensure this is correct without the security token
10
  SECURITY_TOKEN = "jqe4His8AcuFJucZz5NBHfGU" # Your Salesforce Security Token
11
+ TOKEN_URL = "https://login.salesforce.com/services/oauth2/token" # Use for production; change to test.salesforce.com for sandbox
12
  API_VERSION = "v60.0"
13
 
14
  # ---------------------- AUTH ----------------------
 
19
  "client_id": CLIENT_ID,
20
  "client_secret": CLIENT_SECRET,
21
  "username": USERNAME,
22
+ "password": PASSWORD + SECURITY_TOKEN # Concatenate password and security token correctly
23
  }
24
  response = requests.post(TOKEN_URL, data=data)
25