GuglielmoTor commited on
Commit
690d663
·
verified ·
1 Parent(s): 35ed909

Delete utils/sessions.py

Browse files
Files changed (1) hide show
  1. utils/sessions.py +0 -17
utils/sessions.py DELETED
@@ -1,17 +0,0 @@
1
- #sessions.py
2
- from requests_oauthlib import OAuth2Session
3
-
4
-
5
- REDIRECT_URI = "https://app.ingaze.ai/version-test/linkedin_monitoring?debug_mode=true"
6
- def create_session(client_id, token=None):
7
- """Creates a requests_oauthlib session."""
8
- # Note: Scope is usually not needed here, only for authorization_url
9
- session = OAuth2Session(client_id, token=token, redirect_uri=REDIRECT_URI)
10
- # Add required LinkedIn headers
11
- session.headers.update({
12
- 'LinkedIn-Version': "202502",
13
- # REST API often requires this, though sometimes works without.
14
- # Let's keep it commented out unless needed, as REST calls seem to work.
15
- # 'X-Restli-Protocol-Version': '2.0.0'
16
- })
17
- return session