-
Notifications
You must be signed in to change notification settings - Fork 0
/
env_help
29 lines (27 loc) · 2.29 KB
/
env_help
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# #### linkedin dev tools
# If you have already created an app, use:https://www.linkedin.com/developers/apps
# otherwise, create one.
# Token is generated only after we fill all fields in app (including policy url and company url in widget section).
# Create app -> fill all details -> add redirect url -> request access to share API -> verify company.
# goto auth tool -> generate token (https://www.linkedin.com/developers/tools/oauth/token-generator)
# deprecation warning: token will expire in 2mos by default. https://www.linkedin.com/developers/apps/{app-id}/settings
LINKEDIN_ACCESS_TOKEN="..."
# `URN` is same as `id`
# REQUEST: https://api.linkedin.com/v2/me?oauth2_access_token={ACCESS_TOKEN}
# RESPONSE: {"localizedLastName":"Rakesh","profilePicture":{"displayImage":"urn:li:digitalmediaAsset:C****ijvbbdfwg"},"firstName":{"localized":{"en_US":"Asapanna"},"preferredLocale":{"country":"US","language":"en"}},"lastName":{"localized":{"en_US":"Rakesh"},"preferredLocale":{"country":"US","language":"en"}},"id":"***********","localizedFirstName":"Asapanna"}
LINKEDIN_URN="..."
# #### twitter dev tools
# keys are available in first page after signup
TWITTER_API_KEY="..."
TWITTER_API_KEY_SECRET="..."
# test bearer token using: `curl -X GET -H "Authorization: Bearer {BEARER_TOKEN}" "https://api.twitter.com/2/tweets/20"`
TWITTER_ACCESS_TOKEN="..."
# REQUEST: curl -X GET -H "Authorization: Bearer {BEARER_TOKEN}" "https://api.twitter.com/2/users/by?usernames=inf800"
# RESPONSE: {"data":[{"id":"229305005382828","name":"Asapanna Rakesh","username":"inf800"}]}
# `id` i.e TWITTER_USER_ID is used to fetch latest tweets using:
# curl -X GET -H "Authorization: Bearer {BEARER_TOKEN}" "https://api.twitter.com/2/users/229305005382828/tweets?max_results=10"
# curl -X GET -H "Authorization: Bearer {BEARER_TOKEN}" "https://api.twitter.com/2/users/229305005382828/tweets?start_time=..."
# curl -X GET -H "Authorization: Bearer {BEARER_TOKEN}" "https://api.twitter.com/2/users/229305005382828/tweets?end_time=..."
# curl -X GET -H "Authorization: Bearer {BEARER_TOKEN}" "https://api.twitter.com/2/users/229305005382828/tweets?since_id={last_published_tweet_id}"
TWITTER_USER_ID="229305005382828"
TWITTER_USERNAME="inf800"