You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java/README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,11 +31,19 @@ Using Maven, add to your `pom.xml`:
31
31
32
32
### 3. Set environment variables
33
33
34
-
For **Bearer Token** authentication (app-only):
34
+
**For read-only operations (search, lookup):**
35
35
```bash
36
36
export BEARER_TOKEN='your_bearer_token'
37
37
```
38
38
39
+
**For user actions (post, like, repost, bookmark, etc.):**
40
+
```bash
41
+
export CLIENT_ID='your_client_id'
42
+
export CLIENT_SECRET='your_client_secret'
43
+
```
44
+
45
+
**Note:** Most user action examples require OAuth 2.0 authentication with `CLIENT_ID` and `CLIENT_SECRET`. Read-only examples (search, lookup) only require `BEARER_TOKEN`.
Copy file name to clipboardExpand all lines: javascript/README.md
+34-32Lines changed: 34 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,75 +16,77 @@ No package.json is required. Examples use Node.js built-in modules or standard l
16
16
17
17
### 3. Set environment variables
18
18
19
-
For **Bearer Token** authentication (app-only):
19
+
**For read-only operations (search, lookup):**
20
20
```bash
21
21
export BEARER_TOKEN='your_bearer_token'
22
22
```
23
23
24
-
For **OAuth 1.0a** authentication (user context):
24
+
**For user actions (post, like, repost, bookmark, mute, etc.):**
25
25
```bash
26
-
exportCONSUMER_KEY='your_consumer_key'
27
-
exportCONSUMER_SECRET='your_consumer_secret'
26
+
exportCLIENT_ID='your_client_id'
27
+
exportCLIENT_SECRET='your_client_secret'
28
28
```
29
29
30
+
**Note:** Most user action examples (create post, like, repost, bookmark, mute, block, etc.) require OAuth 2.0 authentication with `CLIENT_ID` and `CLIENT_SECRET`. Read-only examples (search, lookup) only require `BEARER_TOKEN`.
31
+
30
32
## Examples by Category
31
33
32
34
### Posts
33
-
-`posts/create_post.js` - Create a new post
34
-
-`posts/delete_post.js` - Delete a post
35
-
-`posts/get_liking_users.js` - Get users who liked a post
35
+
-`posts/create_post.js` - Create a new post (requires `CLIENT_ID`, `CLIENT_SECRET`)
36
+
-`posts/delete_post.js` - Delete a post (requires `CLIENT_ID`, `CLIENT_SECRET`)
37
+
-`posts/get_liking_users.js` - Get users who liked a post (requires `CLIENT_ID`, `CLIENT_SECRET` for user context)
36
38
-`posts/get_post_counts_all.js` - Get post counts (full archive)
37
39
-`posts/get_post_counts_recent.js` - Get post counts (recent)
38
40
-`posts/get_posts_by_ids.js` - Look up posts by ID (bearer token)
39
-
-`posts/get_posts_by_ids_user_context.js` - Look up posts by ID (user context)
41
+
-`posts/get_posts_by_ids_user_context.js` - Look up posts by ID (user context) (requires `CLIENT_ID`, `CLIENT_SECRET`)
40
42
-`posts/get_quoted_posts.js` - Get posts that quote a post
41
43
-`posts/get_reposted_by.js` - Get users who reposted a post
Copy file name to clipboardExpand all lines: python/README.md
+44-37Lines changed: 44 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,17 +13,24 @@ The `requirements.txt` file includes:
13
13
14
14
## Environment Variables
15
15
16
+
**For read-only operations (search, lookup):**
16
17
```bash
17
18
export BEARER_TOKEN='your_bearer_token'
18
-
export CONSUMER_KEY='your_consumer_key'
19
-
export CONSUMER_SECRET='your_consumer_secret'
20
19
```
21
20
21
+
**For user actions (post, like, repost, bookmark, mute, etc.):**
22
+
```bash
23
+
export CLIENT_ID='your_client_id'
24
+
export CLIENT_SECRET='your_client_secret'
25
+
```
26
+
27
+
**Note:** Most user action examples (create post, like, repost, bookmark, mute, block, etc.) require OAuth 2.0 authentication with `CLIENT_ID` and `CLIENT_SECRET`. Read-only examples (search, lookup) only require `BEARER_TOKEN`.
28
+
22
29
## Examples
23
30
24
31
### Posts
25
-
-`posts/create_post.py` - Create a new post
26
-
-`posts/delete_post.py` - Delete a post
32
+
-`posts/create_post.py` - Create a new post (requires `CLIENT_ID`, `CLIENT_SECRET`)
33
+
-`posts/delete_post.py` - Delete a post (requires `CLIENT_ID`, `CLIENT_SECRET`)
27
34
-`posts/get_liking_users.py` - Get users who liked a post
28
35
-`posts/get_post_counts_all.py` - Get post counts (full archive)
29
36
-`posts/get_post_counts_recent.py` - Get post counts (recent)
Copy file name to clipboardExpand all lines: ruby/README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,17 +28,25 @@ The `Gemfile` includes:
28
28
29
29
### 3. Set environment variables
30
30
31
-
For **Bearer Token** authentication (app-only):
31
+
**For read-only operations (search, lookup):**
32
32
```bash
33
33
export BEARER_TOKEN='your_bearer_token'
34
34
```
35
35
36
-
For **OAuth 1.0a** authentication (user context):
36
+
**For user actions (post, like, repost, bookmark, etc.):**
37
+
```bash
38
+
export CLIENT_ID='your_client_id'
39
+
export CLIENT_SECRET='your_client_secret'
40
+
```
41
+
42
+
**For OAuth 1.0a (legacy endpoints):**
37
43
```bash
38
44
export CONSUMER_KEY='your_consumer_key'
39
45
export CONSUMER_SECRET='your_consumer_secret'
40
46
```
41
47
48
+
**Note:** Most user action examples require OAuth 2.0 authentication with `CLIENT_ID` and `CLIENT_SECRET`. Read-only examples (search, lookup) only require `BEARER_TOKEN`.
0 commit comments