All URIs are relative to https://x.com/i/api
| Method | HTTP request | Description |
|---|---|---|
| postCreateBookmark | POST /graphql/{pathQueryId}/CreateBookmark | |
| postCreateRetweet | POST /graphql/{pathQueryId}/CreateRetweet | |
| postCreateTweet | POST /graphql/{pathQueryId}/CreateTweet | |
| postDeleteBookmark | POST /graphql/{pathQueryId}/DeleteBookmark | |
| postDeleteRetweet | POST /graphql/{pathQueryId}/DeleteRetweet | |
| postDeleteTweet | POST /graphql/{pathQueryId}/DeleteTweet | |
| postFavoriteTweet | POST /graphql/{pathQueryId}/FavoriteTweet | |
| postUnfavoriteTweet | POST /graphql/{pathQueryId}/UnfavoriteTweet |
CreateBookmarkResponse postCreateBookmark(pathQueryId, postCreateBookmarkRequest)
create Bookmark
import {
Configuration,
PostApi,
} from 'twitter-openapi-typescript-generated';
import type { PostCreateBookmarkOperationRequest } from 'twitter-openapi-typescript-generated';
async function example() {
console.log("🚀 Testing twitter-openapi-typescript-generated SDK...");
const config = new Configuration({
// To configure API key authorization: Accept
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: Priority
apiKey: "YOUR API KEY",
// To configure API key authorization: Referer
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchDest
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaPlatform
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchMode
apiKey: "YOUR API KEY",
// To configure API key authorization: CsrfToken
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientUuid
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
// To configure API key authorization: GuestToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUa
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieGt0
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientTransactionId
apiKey: "YOUR API KEY",
// To configure API key authorization: ActiveUser
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieCt0
apiKey: "YOUR API KEY",
// To configure API key authorization: UserAgent
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchSite
apiKey: "YOUR API KEY",
// To configure API key authorization: AuthType
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieAuthToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaMobile
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptEncoding
apiKey: "YOUR API KEY",
});
const api = new PostApi(config);
const body = {
// string
pathQueryId: aoDbu3RHznuiSkQ9aNM67Q,
// PostCreateBookmarkRequest | body
postCreateBookmarkRequest: ...,
} satisfies PostCreateBookmarkOperationRequest;
try {
const data = await api.postCreateBookmark(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| pathQueryId | string |
[Defaults to 'aoDbu3RHznuiSkQ9aNM67Q'] |
|
| postCreateBookmarkRequest | PostCreateBookmarkRequest | body |
Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation | * x-connection-hash - * x-rate-limit-limit - * x-rate-limit-remaining - * x-rate-limit-reset - * x-response-time - * x-tfe-preserve-body - * x-transaction-id - * x-twitter-response-tags - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateRetweetResponse postCreateRetweet(pathQueryId, postCreateRetweetRequest)
create Retweet
import {
Configuration,
PostApi,
} from 'twitter-openapi-typescript-generated';
import type { PostCreateRetweetOperationRequest } from 'twitter-openapi-typescript-generated';
async function example() {
console.log("🚀 Testing twitter-openapi-typescript-generated SDK...");
const config = new Configuration({
// To configure API key authorization: Accept
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: Priority
apiKey: "YOUR API KEY",
// To configure API key authorization: Referer
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchDest
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaPlatform
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchMode
apiKey: "YOUR API KEY",
// To configure API key authorization: CsrfToken
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientUuid
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
// To configure API key authorization: GuestToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUa
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieGt0
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientTransactionId
apiKey: "YOUR API KEY",
// To configure API key authorization: ActiveUser
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieCt0
apiKey: "YOUR API KEY",
// To configure API key authorization: UserAgent
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchSite
apiKey: "YOUR API KEY",
// To configure API key authorization: AuthType
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieAuthToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaMobile
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptEncoding
apiKey: "YOUR API KEY",
});
const api = new PostApi(config);
const body = {
// string
pathQueryId: mbRO74GrOvSfRcJnlMapnQ,
// PostCreateRetweetRequest | body
postCreateRetweetRequest: ...,
} satisfies PostCreateRetweetOperationRequest;
try {
const data = await api.postCreateRetweet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| pathQueryId | string |
[Defaults to 'mbRO74GrOvSfRcJnlMapnQ'] |
|
| postCreateRetweetRequest | PostCreateRetweetRequest | body |
Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation | * x-connection-hash - * x-rate-limit-limit - * x-rate-limit-remaining - * x-rate-limit-reset - * x-response-time - * x-tfe-preserve-body - * x-transaction-id - * x-twitter-response-tags - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateTweetResponse postCreateTweet(pathQueryId, postCreateTweetRequest)
create Tweet
import {
Configuration,
PostApi,
} from 'twitter-openapi-typescript-generated';
import type { PostCreateTweetOperationRequest } from 'twitter-openapi-typescript-generated';
async function example() {
console.log("🚀 Testing twitter-openapi-typescript-generated SDK...");
const config = new Configuration({
// To configure API key authorization: Accept
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: Priority
apiKey: "YOUR API KEY",
// To configure API key authorization: Referer
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchDest
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaPlatform
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchMode
apiKey: "YOUR API KEY",
// To configure API key authorization: CsrfToken
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientUuid
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
// To configure API key authorization: GuestToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUa
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieGt0
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientTransactionId
apiKey: "YOUR API KEY",
// To configure API key authorization: ActiveUser
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieCt0
apiKey: "YOUR API KEY",
// To configure API key authorization: UserAgent
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchSite
apiKey: "YOUR API KEY",
// To configure API key authorization: AuthType
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieAuthToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaMobile
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptEncoding
apiKey: "YOUR API KEY",
});
const api = new PostApi(config);
const body = {
// string
pathQueryId: 5CdvsV_zjv4L64XFifAglw,
// PostCreateTweetRequest | body
postCreateTweetRequest: ...,
} satisfies PostCreateTweetOperationRequest;
try {
const data = await api.postCreateTweet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| pathQueryId | string |
[Defaults to '5CdvsV_zjv4L64XFifAglw'] |
|
| postCreateTweetRequest | PostCreateTweetRequest | body |
Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation | * x-connection-hash - * x-rate-limit-limit - * x-rate-limit-remaining - * x-rate-limit-reset - * x-response-time - * x-tfe-preserve-body - * x-transaction-id - * x-twitter-response-tags - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteBookmarkResponse postDeleteBookmark(pathQueryId, postDeleteBookmarkRequest)
delete Bookmark
import {
Configuration,
PostApi,
} from 'twitter-openapi-typescript-generated';
import type { PostDeleteBookmarkOperationRequest } from 'twitter-openapi-typescript-generated';
async function example() {
console.log("🚀 Testing twitter-openapi-typescript-generated SDK...");
const config = new Configuration({
// To configure API key authorization: Accept
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: Priority
apiKey: "YOUR API KEY",
// To configure API key authorization: Referer
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchDest
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaPlatform
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchMode
apiKey: "YOUR API KEY",
// To configure API key authorization: CsrfToken
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientUuid
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
// To configure API key authorization: GuestToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUa
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieGt0
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientTransactionId
apiKey: "YOUR API KEY",
// To configure API key authorization: ActiveUser
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieCt0
apiKey: "YOUR API KEY",
// To configure API key authorization: UserAgent
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchSite
apiKey: "YOUR API KEY",
// To configure API key authorization: AuthType
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieAuthToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaMobile
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptEncoding
apiKey: "YOUR API KEY",
});
const api = new PostApi(config);
const body = {
// string
pathQueryId: Wlmlj2-xzyS1GN3a6cj-mQ,
// PostDeleteBookmarkRequest | body
postDeleteBookmarkRequest: ...,
} satisfies PostDeleteBookmarkOperationRequest;
try {
const data = await api.postDeleteBookmark(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| pathQueryId | string |
[Defaults to 'Wlmlj2-xzyS1GN3a6cj-mQ'] |
|
| postDeleteBookmarkRequest | PostDeleteBookmarkRequest | body |
Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation | * x-connection-hash - * x-rate-limit-limit - * x-rate-limit-remaining - * x-rate-limit-reset - * x-response-time - * x-tfe-preserve-body - * x-transaction-id - * x-twitter-response-tags - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteRetweetResponse postDeleteRetweet(pathQueryId, postDeleteRetweetRequest)
delete Retweet
import {
Configuration,
PostApi,
} from 'twitter-openapi-typescript-generated';
import type { PostDeleteRetweetOperationRequest } from 'twitter-openapi-typescript-generated';
async function example() {
console.log("🚀 Testing twitter-openapi-typescript-generated SDK...");
const config = new Configuration({
// To configure API key authorization: Accept
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: Priority
apiKey: "YOUR API KEY",
// To configure API key authorization: Referer
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchDest
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaPlatform
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchMode
apiKey: "YOUR API KEY",
// To configure API key authorization: CsrfToken
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientUuid
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
// To configure API key authorization: GuestToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUa
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieGt0
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientTransactionId
apiKey: "YOUR API KEY",
// To configure API key authorization: ActiveUser
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieCt0
apiKey: "YOUR API KEY",
// To configure API key authorization: UserAgent
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchSite
apiKey: "YOUR API KEY",
// To configure API key authorization: AuthType
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieAuthToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaMobile
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptEncoding
apiKey: "YOUR API KEY",
});
const api = new PostApi(config);
const body = {
// string
pathQueryId: ZyZigVsNiFO6v1dEks1eWg,
// PostDeleteRetweetRequest | body
postDeleteRetweetRequest: ...,
} satisfies PostDeleteRetweetOperationRequest;
try {
const data = await api.postDeleteRetweet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| pathQueryId | string |
[Defaults to 'ZyZigVsNiFO6v1dEks1eWg'] |
|
| postDeleteRetweetRequest | PostDeleteRetweetRequest | body |
Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation | * x-connection-hash - * x-rate-limit-limit - * x-rate-limit-remaining - * x-rate-limit-reset - * x-response-time - * x-tfe-preserve-body - * x-transaction-id - * x-twitter-response-tags - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteTweetResponse postDeleteTweet(pathQueryId, postDeleteTweetRequest)
delete Retweet
import {
Configuration,
PostApi,
} from 'twitter-openapi-typescript-generated';
import type { PostDeleteTweetOperationRequest } from 'twitter-openapi-typescript-generated';
async function example() {
console.log("🚀 Testing twitter-openapi-typescript-generated SDK...");
const config = new Configuration({
// To configure API key authorization: Accept
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: Priority
apiKey: "YOUR API KEY",
// To configure API key authorization: Referer
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchDest
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaPlatform
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchMode
apiKey: "YOUR API KEY",
// To configure API key authorization: CsrfToken
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientUuid
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
// To configure API key authorization: GuestToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUa
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieGt0
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientTransactionId
apiKey: "YOUR API KEY",
// To configure API key authorization: ActiveUser
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieCt0
apiKey: "YOUR API KEY",
// To configure API key authorization: UserAgent
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchSite
apiKey: "YOUR API KEY",
// To configure API key authorization: AuthType
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieAuthToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaMobile
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptEncoding
apiKey: "YOUR API KEY",
});
const api = new PostApi(config);
const body = {
// string
pathQueryId: VaenaVgh5q5ih7kvyVjgtg,
// PostDeleteTweetRequest | body
postDeleteTweetRequest: ...,
} satisfies PostDeleteTweetOperationRequest;
try {
const data = await api.postDeleteTweet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| pathQueryId | string |
[Defaults to 'VaenaVgh5q5ih7kvyVjgtg'] |
|
| postDeleteTweetRequest | PostDeleteTweetRequest | body |
Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation | * x-connection-hash - * x-rate-limit-limit - * x-rate-limit-remaining - * x-rate-limit-reset - * x-response-time - * x-tfe-preserve-body - * x-transaction-id - * x-twitter-response-tags - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FavoriteTweetResponse postFavoriteTweet(pathQueryId, postFavoriteTweetRequest)
favorite Tweet
import {
Configuration,
PostApi,
} from 'twitter-openapi-typescript-generated';
import type { PostFavoriteTweetOperationRequest } from 'twitter-openapi-typescript-generated';
async function example() {
console.log("🚀 Testing twitter-openapi-typescript-generated SDK...");
const config = new Configuration({
// To configure API key authorization: Accept
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: Priority
apiKey: "YOUR API KEY",
// To configure API key authorization: Referer
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchDest
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaPlatform
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchMode
apiKey: "YOUR API KEY",
// To configure API key authorization: CsrfToken
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientUuid
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
// To configure API key authorization: GuestToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUa
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieGt0
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientTransactionId
apiKey: "YOUR API KEY",
// To configure API key authorization: ActiveUser
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieCt0
apiKey: "YOUR API KEY",
// To configure API key authorization: UserAgent
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchSite
apiKey: "YOUR API KEY",
// To configure API key authorization: AuthType
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieAuthToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaMobile
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptEncoding
apiKey: "YOUR API KEY",
});
const api = new PostApi(config);
const body = {
// string
pathQueryId: lI07N6Otwv1PhnEgXILM7A,
// PostFavoriteTweetRequest | body
postFavoriteTweetRequest: ...,
} satisfies PostFavoriteTweetOperationRequest;
try {
const data = await api.postFavoriteTweet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| pathQueryId | string |
[Defaults to 'lI07N6Otwv1PhnEgXILM7A'] |
|
| postFavoriteTweetRequest | PostFavoriteTweetRequest | body |
Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation | * x-connection-hash - * x-rate-limit-limit - * x-rate-limit-remaining - * x-rate-limit-reset - * x-response-time - * x-tfe-preserve-body - * x-transaction-id - * x-twitter-response-tags - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UnfavoriteTweetResponse postUnfavoriteTweet(pathQueryId, postUnfavoriteTweetRequest)
unfavorite Tweet
import {
Configuration,
PostApi,
} from 'twitter-openapi-typescript-generated';
import type { PostUnfavoriteTweetOperationRequest } from 'twitter-openapi-typescript-generated';
async function example() {
console.log("🚀 Testing twitter-openapi-typescript-generated SDK...");
const config = new Configuration({
// To configure API key authorization: Accept
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: Priority
apiKey: "YOUR API KEY",
// To configure API key authorization: Referer
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchDest
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaPlatform
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchMode
apiKey: "YOUR API KEY",
// To configure API key authorization: CsrfToken
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientUuid
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
// To configure API key authorization: GuestToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUa
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieGt0
apiKey: "YOUR API KEY",
// To configure API key authorization: ClientTransactionId
apiKey: "YOUR API KEY",
// To configure API key authorization: ActiveUser
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieCt0
apiKey: "YOUR API KEY",
// To configure API key authorization: UserAgent
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptLanguage
apiKey: "YOUR API KEY",
// To configure API key authorization: SecFetchSite
apiKey: "YOUR API KEY",
// To configure API key authorization: AuthType
apiKey: "YOUR API KEY",
// To configure API key authorization: CookieAuthToken
apiKey: "YOUR API KEY",
// To configure API key authorization: SecChUaMobile
apiKey: "YOUR API KEY",
// To configure API key authorization: AcceptEncoding
apiKey: "YOUR API KEY",
});
const api = new PostApi(config);
const body = {
// string
pathQueryId: ZYKSe-w7KEslx3JhSIk5LA,
// PostUnfavoriteTweetRequest | body
postUnfavoriteTweetRequest: ...,
} satisfies PostUnfavoriteTweetOperationRequest;
try {
const data = await api.postUnfavoriteTweet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| pathQueryId | string |
[Defaults to 'ZYKSe-w7KEslx3JhSIk5LA'] |
|
| postUnfavoriteTweetRequest | PostUnfavoriteTweetRequest | body |
Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation | * x-connection-hash - * x-rate-limit-limit - * x-rate-limit-remaining - * x-rate-limit-reset - * x-response-time - * x-tfe-preserve-body - * x-transaction-id - * x-twitter-response-tags - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]