Skip to content

Latest commit

 

History

History
1872 lines (1324 loc) · 79.8 KB

File metadata and controls

1872 lines (1324 loc) · 79.8 KB

twitter_openapi_python_generated.PostApi

All URIs are relative to https://x.com/i/api

Method HTTP request Description
post_create_bookmark POST /graphql/{pathQueryId}/CreateBookmark
post_create_retweet POST /graphql/{pathQueryId}/CreateRetweet
post_create_tweet POST /graphql/{pathQueryId}/CreateTweet
post_delete_bookmark POST /graphql/{pathQueryId}/DeleteBookmark
post_delete_retweet POST /graphql/{pathQueryId}/DeleteRetweet
post_delete_tweet POST /graphql/{pathQueryId}/DeleteTweet
post_favorite_tweet POST /graphql/{pathQueryId}/FavoriteTweet
post_unfavorite_tweet POST /graphql/{pathQueryId}/UnfavoriteTweet

post_create_bookmark

CreateBookmarkResponse post_create_bookmark(path_query_id, post_create_bookmark_request)

create Bookmark

Example

  • Api Key Authentication (Accept):
  • Api Key Authentication (ClientLanguage):
  • Api Key Authentication (Priority):
  • Api Key Authentication (Referer):
  • Api Key Authentication (SecFetchDest):
  • Api Key Authentication (SecChUaPlatform):
  • Api Key Authentication (SecFetchMode):
  • Api Key Authentication (CsrfToken):
  • Api Key Authentication (ClientUuid):
  • Bearer Authentication (BearerAuth):
  • Api Key Authentication (GuestToken):
  • Api Key Authentication (SecChUa):
  • Api Key Authentication (CookieGt0):
  • Api Key Authentication (ClientTransactionId):
  • Api Key Authentication (ActiveUser):
  • Api Key Authentication (CookieCt0):
  • Api Key Authentication (UserAgent):
  • Api Key Authentication (AcceptLanguage):
  • Api Key Authentication (SecFetchSite):
  • Api Key Authentication (AuthType):
  • Api Key Authentication (CookieAuthToken):
  • Api Key Authentication (SecChUaMobile):
  • Api Key Authentication (AcceptEncoding):
import twitter_openapi_python_generated
from twitter_openapi_python_generated.models.create_bookmark_response import CreateBookmarkResponse
from twitter_openapi_python_generated.models.post_create_bookmark_request import PostCreateBookmarkRequest
from twitter_openapi_python_generated.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://x.com/i/api
# See configuration.py for a list of all supported configuration parameters.
configuration = twitter_openapi_python_generated.Configuration(
    host = "https://x.com/i/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Accept
configuration.api_key['Accept'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Accept'] = 'Bearer'

# Configure API key authorization: ClientLanguage
configuration.api_key['ClientLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientLanguage'] = 'Bearer'

# Configure API key authorization: Priority
configuration.api_key['Priority'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Priority'] = 'Bearer'

# Configure API key authorization: Referer
configuration.api_key['Referer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'

# Configure API key authorization: SecFetchDest
configuration.api_key['SecFetchDest'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchDest'] = 'Bearer'

# Configure API key authorization: SecChUaPlatform
configuration.api_key['SecChUaPlatform'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaPlatform'] = 'Bearer'

# Configure API key authorization: SecFetchMode
configuration.api_key['SecFetchMode'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchMode'] = 'Bearer'

# Configure API key authorization: CsrfToken
configuration.api_key['CsrfToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CsrfToken'] = 'Bearer'

# Configure API key authorization: ClientUuid
configuration.api_key['ClientUuid'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientUuid'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = twitter_openapi_python_generated.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: GuestToken
configuration.api_key['GuestToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['GuestToken'] = 'Bearer'

# Configure API key authorization: SecChUa
configuration.api_key['SecChUa'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUa'] = 'Bearer'

# Configure API key authorization: CookieGt0
configuration.api_key['CookieGt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieGt0'] = 'Bearer'

# Configure API key authorization: ClientTransactionId
configuration.api_key['ClientTransactionId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientTransactionId'] = 'Bearer'

# Configure API key authorization: ActiveUser
configuration.api_key['ActiveUser'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ActiveUser'] = 'Bearer'

# Configure API key authorization: CookieCt0
configuration.api_key['CookieCt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieCt0'] = 'Bearer'

# Configure API key authorization: UserAgent
configuration.api_key['UserAgent'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['UserAgent'] = 'Bearer'

# Configure API key authorization: AcceptLanguage
configuration.api_key['AcceptLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptLanguage'] = 'Bearer'

# Configure API key authorization: SecFetchSite
configuration.api_key['SecFetchSite'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchSite'] = 'Bearer'

# Configure API key authorization: AuthType
configuration.api_key['AuthType'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthType'] = 'Bearer'

# Configure API key authorization: CookieAuthToken
configuration.api_key['CookieAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieAuthToken'] = 'Bearer'

# Configure API key authorization: SecChUaMobile
configuration.api_key['SecChUaMobile'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaMobile'] = 'Bearer'

# Configure API key authorization: AcceptEncoding
configuration.api_key['AcceptEncoding'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptEncoding'] = 'Bearer'

# Enter a context with an instance of the API client
with twitter_openapi_python_generated.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twitter_openapi_python_generated.PostApi(api_client)
    path_query_id = 'aoDbu3RHznuiSkQ9aNM67Q' # str |  (default to 'aoDbu3RHznuiSkQ9aNM67Q')
    post_create_bookmark_request = twitter_openapi_python_generated.PostCreateBookmarkRequest() # PostCreateBookmarkRequest | body

    try:
        api_response = api_instance.post_create_bookmark(path_query_id, post_create_bookmark_request)
        print("The response of PostApi->post_create_bookmark:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PostApi->post_create_bookmark: %s\n" % e)

Parameters

Name Type Description Notes
path_query_id str [default to 'aoDbu3RHznuiSkQ9aNM67Q']
post_create_bookmark_request PostCreateBookmarkRequest body

Return type

CreateBookmarkResponse

Authorization

Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

post_create_retweet

CreateRetweetResponse post_create_retweet(path_query_id, post_create_retweet_request)

create Retweet

Example

  • Api Key Authentication (Accept):
  • Api Key Authentication (ClientLanguage):
  • Api Key Authentication (Priority):
  • Api Key Authentication (Referer):
  • Api Key Authentication (SecFetchDest):
  • Api Key Authentication (SecChUaPlatform):
  • Api Key Authentication (SecFetchMode):
  • Api Key Authentication (CsrfToken):
  • Api Key Authentication (ClientUuid):
  • Bearer Authentication (BearerAuth):
  • Api Key Authentication (GuestToken):
  • Api Key Authentication (SecChUa):
  • Api Key Authentication (CookieGt0):
  • Api Key Authentication (ClientTransactionId):
  • Api Key Authentication (ActiveUser):
  • Api Key Authentication (CookieCt0):
  • Api Key Authentication (UserAgent):
  • Api Key Authentication (AcceptLanguage):
  • Api Key Authentication (SecFetchSite):
  • Api Key Authentication (AuthType):
  • Api Key Authentication (CookieAuthToken):
  • Api Key Authentication (SecChUaMobile):
  • Api Key Authentication (AcceptEncoding):
import twitter_openapi_python_generated
from twitter_openapi_python_generated.models.create_retweet_response import CreateRetweetResponse
from twitter_openapi_python_generated.models.post_create_retweet_request import PostCreateRetweetRequest
from twitter_openapi_python_generated.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://x.com/i/api
# See configuration.py for a list of all supported configuration parameters.
configuration = twitter_openapi_python_generated.Configuration(
    host = "https://x.com/i/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Accept
configuration.api_key['Accept'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Accept'] = 'Bearer'

# Configure API key authorization: ClientLanguage
configuration.api_key['ClientLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientLanguage'] = 'Bearer'

# Configure API key authorization: Priority
configuration.api_key['Priority'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Priority'] = 'Bearer'

# Configure API key authorization: Referer
configuration.api_key['Referer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'

# Configure API key authorization: SecFetchDest
configuration.api_key['SecFetchDest'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchDest'] = 'Bearer'

# Configure API key authorization: SecChUaPlatform
configuration.api_key['SecChUaPlatform'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaPlatform'] = 'Bearer'

# Configure API key authorization: SecFetchMode
configuration.api_key['SecFetchMode'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchMode'] = 'Bearer'

# Configure API key authorization: CsrfToken
configuration.api_key['CsrfToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CsrfToken'] = 'Bearer'

# Configure API key authorization: ClientUuid
configuration.api_key['ClientUuid'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientUuid'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = twitter_openapi_python_generated.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: GuestToken
configuration.api_key['GuestToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['GuestToken'] = 'Bearer'

# Configure API key authorization: SecChUa
configuration.api_key['SecChUa'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUa'] = 'Bearer'

# Configure API key authorization: CookieGt0
configuration.api_key['CookieGt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieGt0'] = 'Bearer'

# Configure API key authorization: ClientTransactionId
configuration.api_key['ClientTransactionId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientTransactionId'] = 'Bearer'

# Configure API key authorization: ActiveUser
configuration.api_key['ActiveUser'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ActiveUser'] = 'Bearer'

# Configure API key authorization: CookieCt0
configuration.api_key['CookieCt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieCt0'] = 'Bearer'

# Configure API key authorization: UserAgent
configuration.api_key['UserAgent'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['UserAgent'] = 'Bearer'

# Configure API key authorization: AcceptLanguage
configuration.api_key['AcceptLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptLanguage'] = 'Bearer'

# Configure API key authorization: SecFetchSite
configuration.api_key['SecFetchSite'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchSite'] = 'Bearer'

# Configure API key authorization: AuthType
configuration.api_key['AuthType'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthType'] = 'Bearer'

# Configure API key authorization: CookieAuthToken
configuration.api_key['CookieAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieAuthToken'] = 'Bearer'

# Configure API key authorization: SecChUaMobile
configuration.api_key['SecChUaMobile'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaMobile'] = 'Bearer'

# Configure API key authorization: AcceptEncoding
configuration.api_key['AcceptEncoding'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptEncoding'] = 'Bearer'

# Enter a context with an instance of the API client
with twitter_openapi_python_generated.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twitter_openapi_python_generated.PostApi(api_client)
    path_query_id = 'ojPdsZsimiJrUGLR1sjUtA' # str |  (default to 'ojPdsZsimiJrUGLR1sjUtA')
    post_create_retweet_request = twitter_openapi_python_generated.PostCreateRetweetRequest() # PostCreateRetweetRequest | body

    try:
        api_response = api_instance.post_create_retweet(path_query_id, post_create_retweet_request)
        print("The response of PostApi->post_create_retweet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PostApi->post_create_retweet: %s\n" % e)

Parameters

Name Type Description Notes
path_query_id str [default to 'ojPdsZsimiJrUGLR1sjUtA']
post_create_retweet_request PostCreateRetweetRequest body

Return type

CreateRetweetResponse

Authorization

Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

post_create_tweet

CreateTweetResponse post_create_tweet(path_query_id, post_create_tweet_request)

create Tweet

Example

  • Api Key Authentication (Accept):
  • Api Key Authentication (ClientLanguage):
  • Api Key Authentication (Priority):
  • Api Key Authentication (Referer):
  • Api Key Authentication (SecFetchDest):
  • Api Key Authentication (SecChUaPlatform):
  • Api Key Authentication (SecFetchMode):
  • Api Key Authentication (CsrfToken):
  • Api Key Authentication (ClientUuid):
  • Bearer Authentication (BearerAuth):
  • Api Key Authentication (GuestToken):
  • Api Key Authentication (SecChUa):
  • Api Key Authentication (CookieGt0):
  • Api Key Authentication (ClientTransactionId):
  • Api Key Authentication (ActiveUser):
  • Api Key Authentication (CookieCt0):
  • Api Key Authentication (UserAgent):
  • Api Key Authentication (AcceptLanguage):
  • Api Key Authentication (SecFetchSite):
  • Api Key Authentication (AuthType):
  • Api Key Authentication (CookieAuthToken):
  • Api Key Authentication (SecChUaMobile):
  • Api Key Authentication (AcceptEncoding):
import twitter_openapi_python_generated
from twitter_openapi_python_generated.models.create_tweet_response import CreateTweetResponse
from twitter_openapi_python_generated.models.post_create_tweet_request import PostCreateTweetRequest
from twitter_openapi_python_generated.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://x.com/i/api
# See configuration.py for a list of all supported configuration parameters.
configuration = twitter_openapi_python_generated.Configuration(
    host = "https://x.com/i/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Accept
configuration.api_key['Accept'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Accept'] = 'Bearer'

# Configure API key authorization: ClientLanguage
configuration.api_key['ClientLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientLanguage'] = 'Bearer'

# Configure API key authorization: Priority
configuration.api_key['Priority'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Priority'] = 'Bearer'

# Configure API key authorization: Referer
configuration.api_key['Referer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'

# Configure API key authorization: SecFetchDest
configuration.api_key['SecFetchDest'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchDest'] = 'Bearer'

# Configure API key authorization: SecChUaPlatform
configuration.api_key['SecChUaPlatform'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaPlatform'] = 'Bearer'

# Configure API key authorization: SecFetchMode
configuration.api_key['SecFetchMode'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchMode'] = 'Bearer'

# Configure API key authorization: CsrfToken
configuration.api_key['CsrfToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CsrfToken'] = 'Bearer'

# Configure API key authorization: ClientUuid
configuration.api_key['ClientUuid'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientUuid'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = twitter_openapi_python_generated.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: GuestToken
configuration.api_key['GuestToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['GuestToken'] = 'Bearer'

# Configure API key authorization: SecChUa
configuration.api_key['SecChUa'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUa'] = 'Bearer'

# Configure API key authorization: CookieGt0
configuration.api_key['CookieGt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieGt0'] = 'Bearer'

# Configure API key authorization: ClientTransactionId
configuration.api_key['ClientTransactionId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientTransactionId'] = 'Bearer'

# Configure API key authorization: ActiveUser
configuration.api_key['ActiveUser'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ActiveUser'] = 'Bearer'

# Configure API key authorization: CookieCt0
configuration.api_key['CookieCt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieCt0'] = 'Bearer'

# Configure API key authorization: UserAgent
configuration.api_key['UserAgent'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['UserAgent'] = 'Bearer'

# Configure API key authorization: AcceptLanguage
configuration.api_key['AcceptLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptLanguage'] = 'Bearer'

# Configure API key authorization: SecFetchSite
configuration.api_key['SecFetchSite'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchSite'] = 'Bearer'

# Configure API key authorization: AuthType
configuration.api_key['AuthType'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthType'] = 'Bearer'

# Configure API key authorization: CookieAuthToken
configuration.api_key['CookieAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieAuthToken'] = 'Bearer'

# Configure API key authorization: SecChUaMobile
configuration.api_key['SecChUaMobile'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaMobile'] = 'Bearer'

# Configure API key authorization: AcceptEncoding
configuration.api_key['AcceptEncoding'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptEncoding'] = 'Bearer'

# Enter a context with an instance of the API client
with twitter_openapi_python_generated.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twitter_openapi_python_generated.PostApi(api_client)
    path_query_id = 'IID9x6WsdMnTlXnzXGq8ng' # str |  (default to 'IID9x6WsdMnTlXnzXGq8ng')
    post_create_tweet_request = twitter_openapi_python_generated.PostCreateTweetRequest() # PostCreateTweetRequest | body

    try:
        api_response = api_instance.post_create_tweet(path_query_id, post_create_tweet_request)
        print("The response of PostApi->post_create_tweet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PostApi->post_create_tweet: %s\n" % e)

Parameters

Name Type Description Notes
path_query_id str [default to 'IID9x6WsdMnTlXnzXGq8ng']
post_create_tweet_request PostCreateTweetRequest body

Return type

CreateTweetResponse

Authorization

Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

post_delete_bookmark

DeleteBookmarkResponse post_delete_bookmark(path_query_id, post_delete_bookmark_request)

delete Bookmark

Example

  • Api Key Authentication (Accept):
  • Api Key Authentication (ClientLanguage):
  • Api Key Authentication (Priority):
  • Api Key Authentication (Referer):
  • Api Key Authentication (SecFetchDest):
  • Api Key Authentication (SecChUaPlatform):
  • Api Key Authentication (SecFetchMode):
  • Api Key Authentication (CsrfToken):
  • Api Key Authentication (ClientUuid):
  • Bearer Authentication (BearerAuth):
  • Api Key Authentication (GuestToken):
  • Api Key Authentication (SecChUa):
  • Api Key Authentication (CookieGt0):
  • Api Key Authentication (ClientTransactionId):
  • Api Key Authentication (ActiveUser):
  • Api Key Authentication (CookieCt0):
  • Api Key Authentication (UserAgent):
  • Api Key Authentication (AcceptLanguage):
  • Api Key Authentication (SecFetchSite):
  • Api Key Authentication (AuthType):
  • Api Key Authentication (CookieAuthToken):
  • Api Key Authentication (SecChUaMobile):
  • Api Key Authentication (AcceptEncoding):
import twitter_openapi_python_generated
from twitter_openapi_python_generated.models.delete_bookmark_response import DeleteBookmarkResponse
from twitter_openapi_python_generated.models.post_delete_bookmark_request import PostDeleteBookmarkRequest
from twitter_openapi_python_generated.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://x.com/i/api
# See configuration.py for a list of all supported configuration parameters.
configuration = twitter_openapi_python_generated.Configuration(
    host = "https://x.com/i/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Accept
configuration.api_key['Accept'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Accept'] = 'Bearer'

# Configure API key authorization: ClientLanguage
configuration.api_key['ClientLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientLanguage'] = 'Bearer'

# Configure API key authorization: Priority
configuration.api_key['Priority'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Priority'] = 'Bearer'

# Configure API key authorization: Referer
configuration.api_key['Referer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'

# Configure API key authorization: SecFetchDest
configuration.api_key['SecFetchDest'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchDest'] = 'Bearer'

# Configure API key authorization: SecChUaPlatform
configuration.api_key['SecChUaPlatform'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaPlatform'] = 'Bearer'

# Configure API key authorization: SecFetchMode
configuration.api_key['SecFetchMode'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchMode'] = 'Bearer'

# Configure API key authorization: CsrfToken
configuration.api_key['CsrfToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CsrfToken'] = 'Bearer'

# Configure API key authorization: ClientUuid
configuration.api_key['ClientUuid'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientUuid'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = twitter_openapi_python_generated.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: GuestToken
configuration.api_key['GuestToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['GuestToken'] = 'Bearer'

# Configure API key authorization: SecChUa
configuration.api_key['SecChUa'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUa'] = 'Bearer'

# Configure API key authorization: CookieGt0
configuration.api_key['CookieGt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieGt0'] = 'Bearer'

# Configure API key authorization: ClientTransactionId
configuration.api_key['ClientTransactionId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientTransactionId'] = 'Bearer'

# Configure API key authorization: ActiveUser
configuration.api_key['ActiveUser'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ActiveUser'] = 'Bearer'

# Configure API key authorization: CookieCt0
configuration.api_key['CookieCt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieCt0'] = 'Bearer'

# Configure API key authorization: UserAgent
configuration.api_key['UserAgent'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['UserAgent'] = 'Bearer'

# Configure API key authorization: AcceptLanguage
configuration.api_key['AcceptLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptLanguage'] = 'Bearer'

# Configure API key authorization: SecFetchSite
configuration.api_key['SecFetchSite'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchSite'] = 'Bearer'

# Configure API key authorization: AuthType
configuration.api_key['AuthType'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthType'] = 'Bearer'

# Configure API key authorization: CookieAuthToken
configuration.api_key['CookieAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieAuthToken'] = 'Bearer'

# Configure API key authorization: SecChUaMobile
configuration.api_key['SecChUaMobile'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaMobile'] = 'Bearer'

# Configure API key authorization: AcceptEncoding
configuration.api_key['AcceptEncoding'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptEncoding'] = 'Bearer'

# Enter a context with an instance of the API client
with twitter_openapi_python_generated.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twitter_openapi_python_generated.PostApi(api_client)
    path_query_id = 'Wlmlj2-xzyS1GN3a6cj-mQ' # str |  (default to 'Wlmlj2-xzyS1GN3a6cj-mQ')
    post_delete_bookmark_request = twitter_openapi_python_generated.PostDeleteBookmarkRequest() # PostDeleteBookmarkRequest | body

    try:
        api_response = api_instance.post_delete_bookmark(path_query_id, post_delete_bookmark_request)
        print("The response of PostApi->post_delete_bookmark:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PostApi->post_delete_bookmark: %s\n" % e)

Parameters

Name Type Description Notes
path_query_id str [default to 'Wlmlj2-xzyS1GN3a6cj-mQ']
post_delete_bookmark_request PostDeleteBookmarkRequest body

Return type

DeleteBookmarkResponse

Authorization

Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

post_delete_retweet

DeleteRetweetResponse post_delete_retweet(path_query_id, post_delete_retweet_request)

delete Retweet

Example

  • Api Key Authentication (Accept):
  • Api Key Authentication (ClientLanguage):
  • Api Key Authentication (Priority):
  • Api Key Authentication (Referer):
  • Api Key Authentication (SecFetchDest):
  • Api Key Authentication (SecChUaPlatform):
  • Api Key Authentication (SecFetchMode):
  • Api Key Authentication (CsrfToken):
  • Api Key Authentication (ClientUuid):
  • Bearer Authentication (BearerAuth):
  • Api Key Authentication (GuestToken):
  • Api Key Authentication (SecChUa):
  • Api Key Authentication (CookieGt0):
  • Api Key Authentication (ClientTransactionId):
  • Api Key Authentication (ActiveUser):
  • Api Key Authentication (CookieCt0):
  • Api Key Authentication (UserAgent):
  • Api Key Authentication (AcceptLanguage):
  • Api Key Authentication (SecFetchSite):
  • Api Key Authentication (AuthType):
  • Api Key Authentication (CookieAuthToken):
  • Api Key Authentication (SecChUaMobile):
  • Api Key Authentication (AcceptEncoding):
import twitter_openapi_python_generated
from twitter_openapi_python_generated.models.delete_retweet_response import DeleteRetweetResponse
from twitter_openapi_python_generated.models.post_delete_retweet_request import PostDeleteRetweetRequest
from twitter_openapi_python_generated.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://x.com/i/api
# See configuration.py for a list of all supported configuration parameters.
configuration = twitter_openapi_python_generated.Configuration(
    host = "https://x.com/i/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Accept
configuration.api_key['Accept'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Accept'] = 'Bearer'

# Configure API key authorization: ClientLanguage
configuration.api_key['ClientLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientLanguage'] = 'Bearer'

# Configure API key authorization: Priority
configuration.api_key['Priority'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Priority'] = 'Bearer'

# Configure API key authorization: Referer
configuration.api_key['Referer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'

# Configure API key authorization: SecFetchDest
configuration.api_key['SecFetchDest'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchDest'] = 'Bearer'

# Configure API key authorization: SecChUaPlatform
configuration.api_key['SecChUaPlatform'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaPlatform'] = 'Bearer'

# Configure API key authorization: SecFetchMode
configuration.api_key['SecFetchMode'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchMode'] = 'Bearer'

# Configure API key authorization: CsrfToken
configuration.api_key['CsrfToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CsrfToken'] = 'Bearer'

# Configure API key authorization: ClientUuid
configuration.api_key['ClientUuid'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientUuid'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = twitter_openapi_python_generated.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: GuestToken
configuration.api_key['GuestToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['GuestToken'] = 'Bearer'

# Configure API key authorization: SecChUa
configuration.api_key['SecChUa'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUa'] = 'Bearer'

# Configure API key authorization: CookieGt0
configuration.api_key['CookieGt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieGt0'] = 'Bearer'

# Configure API key authorization: ClientTransactionId
configuration.api_key['ClientTransactionId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientTransactionId'] = 'Bearer'

# Configure API key authorization: ActiveUser
configuration.api_key['ActiveUser'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ActiveUser'] = 'Bearer'

# Configure API key authorization: CookieCt0
configuration.api_key['CookieCt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieCt0'] = 'Bearer'

# Configure API key authorization: UserAgent
configuration.api_key['UserAgent'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['UserAgent'] = 'Bearer'

# Configure API key authorization: AcceptLanguage
configuration.api_key['AcceptLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptLanguage'] = 'Bearer'

# Configure API key authorization: SecFetchSite
configuration.api_key['SecFetchSite'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchSite'] = 'Bearer'

# Configure API key authorization: AuthType
configuration.api_key['AuthType'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthType'] = 'Bearer'

# Configure API key authorization: CookieAuthToken
configuration.api_key['CookieAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieAuthToken'] = 'Bearer'

# Configure API key authorization: SecChUaMobile
configuration.api_key['SecChUaMobile'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaMobile'] = 'Bearer'

# Configure API key authorization: AcceptEncoding
configuration.api_key['AcceptEncoding'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptEncoding'] = 'Bearer'

# Enter a context with an instance of the API client
with twitter_openapi_python_generated.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twitter_openapi_python_generated.PostApi(api_client)
    path_query_id = 'iQtK4dl5hBmXewYZuEOKVw' # str |  (default to 'iQtK4dl5hBmXewYZuEOKVw')
    post_delete_retweet_request = twitter_openapi_python_generated.PostDeleteRetweetRequest() # PostDeleteRetweetRequest | body

    try:
        api_response = api_instance.post_delete_retweet(path_query_id, post_delete_retweet_request)
        print("The response of PostApi->post_delete_retweet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PostApi->post_delete_retweet: %s\n" % e)

Parameters

Name Type Description Notes
path_query_id str [default to 'iQtK4dl5hBmXewYZuEOKVw']
post_delete_retweet_request PostDeleteRetweetRequest body

Return type

DeleteRetweetResponse

Authorization

Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

post_delete_tweet

DeleteTweetResponse post_delete_tweet(path_query_id, post_delete_tweet_request)

delete Retweet

Example

  • Api Key Authentication (Accept):
  • Api Key Authentication (ClientLanguage):
  • Api Key Authentication (Priority):
  • Api Key Authentication (Referer):
  • Api Key Authentication (SecFetchDest):
  • Api Key Authentication (SecChUaPlatform):
  • Api Key Authentication (SecFetchMode):
  • Api Key Authentication (CsrfToken):
  • Api Key Authentication (ClientUuid):
  • Bearer Authentication (BearerAuth):
  • Api Key Authentication (GuestToken):
  • Api Key Authentication (SecChUa):
  • Api Key Authentication (CookieGt0):
  • Api Key Authentication (ClientTransactionId):
  • Api Key Authentication (ActiveUser):
  • Api Key Authentication (CookieCt0):
  • Api Key Authentication (UserAgent):
  • Api Key Authentication (AcceptLanguage):
  • Api Key Authentication (SecFetchSite):
  • Api Key Authentication (AuthType):
  • Api Key Authentication (CookieAuthToken):
  • Api Key Authentication (SecChUaMobile):
  • Api Key Authentication (AcceptEncoding):
import twitter_openapi_python_generated
from twitter_openapi_python_generated.models.delete_tweet_response import DeleteTweetResponse
from twitter_openapi_python_generated.models.post_delete_tweet_request import PostDeleteTweetRequest
from twitter_openapi_python_generated.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://x.com/i/api
# See configuration.py for a list of all supported configuration parameters.
configuration = twitter_openapi_python_generated.Configuration(
    host = "https://x.com/i/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Accept
configuration.api_key['Accept'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Accept'] = 'Bearer'

# Configure API key authorization: ClientLanguage
configuration.api_key['ClientLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientLanguage'] = 'Bearer'

# Configure API key authorization: Priority
configuration.api_key['Priority'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Priority'] = 'Bearer'

# Configure API key authorization: Referer
configuration.api_key['Referer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'

# Configure API key authorization: SecFetchDest
configuration.api_key['SecFetchDest'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchDest'] = 'Bearer'

# Configure API key authorization: SecChUaPlatform
configuration.api_key['SecChUaPlatform'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaPlatform'] = 'Bearer'

# Configure API key authorization: SecFetchMode
configuration.api_key['SecFetchMode'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchMode'] = 'Bearer'

# Configure API key authorization: CsrfToken
configuration.api_key['CsrfToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CsrfToken'] = 'Bearer'

# Configure API key authorization: ClientUuid
configuration.api_key['ClientUuid'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientUuid'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = twitter_openapi_python_generated.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: GuestToken
configuration.api_key['GuestToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['GuestToken'] = 'Bearer'

# Configure API key authorization: SecChUa
configuration.api_key['SecChUa'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUa'] = 'Bearer'

# Configure API key authorization: CookieGt0
configuration.api_key['CookieGt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieGt0'] = 'Bearer'

# Configure API key authorization: ClientTransactionId
configuration.api_key['ClientTransactionId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientTransactionId'] = 'Bearer'

# Configure API key authorization: ActiveUser
configuration.api_key['ActiveUser'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ActiveUser'] = 'Bearer'

# Configure API key authorization: CookieCt0
configuration.api_key['CookieCt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieCt0'] = 'Bearer'

# Configure API key authorization: UserAgent
configuration.api_key['UserAgent'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['UserAgent'] = 'Bearer'

# Configure API key authorization: AcceptLanguage
configuration.api_key['AcceptLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptLanguage'] = 'Bearer'

# Configure API key authorization: SecFetchSite
configuration.api_key['SecFetchSite'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchSite'] = 'Bearer'

# Configure API key authorization: AuthType
configuration.api_key['AuthType'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthType'] = 'Bearer'

# Configure API key authorization: CookieAuthToken
configuration.api_key['CookieAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieAuthToken'] = 'Bearer'

# Configure API key authorization: SecChUaMobile
configuration.api_key['SecChUaMobile'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaMobile'] = 'Bearer'

# Configure API key authorization: AcceptEncoding
configuration.api_key['AcceptEncoding'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptEncoding'] = 'Bearer'

# Enter a context with an instance of the API client
with twitter_openapi_python_generated.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twitter_openapi_python_generated.PostApi(api_client)
    path_query_id = 'VaenaVgh5q5ih7kvyVjgtg' # str |  (default to 'VaenaVgh5q5ih7kvyVjgtg')
    post_delete_tweet_request = twitter_openapi_python_generated.PostDeleteTweetRequest() # PostDeleteTweetRequest | body

    try:
        api_response = api_instance.post_delete_tweet(path_query_id, post_delete_tweet_request)
        print("The response of PostApi->post_delete_tweet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PostApi->post_delete_tweet: %s\n" % e)

Parameters

Name Type Description Notes
path_query_id str [default to 'VaenaVgh5q5ih7kvyVjgtg']
post_delete_tweet_request PostDeleteTweetRequest body

Return type

DeleteTweetResponse

Authorization

Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

post_favorite_tweet

FavoriteTweetResponse post_favorite_tweet(path_query_id, post_favorite_tweet_request)

favorite Tweet

Example

  • Api Key Authentication (Accept):
  • Api Key Authentication (ClientLanguage):
  • Api Key Authentication (Priority):
  • Api Key Authentication (Referer):
  • Api Key Authentication (SecFetchDest):
  • Api Key Authentication (SecChUaPlatform):
  • Api Key Authentication (SecFetchMode):
  • Api Key Authentication (CsrfToken):
  • Api Key Authentication (ClientUuid):
  • Bearer Authentication (BearerAuth):
  • Api Key Authentication (GuestToken):
  • Api Key Authentication (SecChUa):
  • Api Key Authentication (CookieGt0):
  • Api Key Authentication (ClientTransactionId):
  • Api Key Authentication (ActiveUser):
  • Api Key Authentication (CookieCt0):
  • Api Key Authentication (UserAgent):
  • Api Key Authentication (AcceptLanguage):
  • Api Key Authentication (SecFetchSite):
  • Api Key Authentication (AuthType):
  • Api Key Authentication (CookieAuthToken):
  • Api Key Authentication (SecChUaMobile):
  • Api Key Authentication (AcceptEncoding):
import twitter_openapi_python_generated
from twitter_openapi_python_generated.models.favorite_tweet_response import FavoriteTweetResponse
from twitter_openapi_python_generated.models.post_favorite_tweet_request import PostFavoriteTweetRequest
from twitter_openapi_python_generated.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://x.com/i/api
# See configuration.py for a list of all supported configuration parameters.
configuration = twitter_openapi_python_generated.Configuration(
    host = "https://x.com/i/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Accept
configuration.api_key['Accept'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Accept'] = 'Bearer'

# Configure API key authorization: ClientLanguage
configuration.api_key['ClientLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientLanguage'] = 'Bearer'

# Configure API key authorization: Priority
configuration.api_key['Priority'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Priority'] = 'Bearer'

# Configure API key authorization: Referer
configuration.api_key['Referer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'

# Configure API key authorization: SecFetchDest
configuration.api_key['SecFetchDest'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchDest'] = 'Bearer'

# Configure API key authorization: SecChUaPlatform
configuration.api_key['SecChUaPlatform'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaPlatform'] = 'Bearer'

# Configure API key authorization: SecFetchMode
configuration.api_key['SecFetchMode'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchMode'] = 'Bearer'

# Configure API key authorization: CsrfToken
configuration.api_key['CsrfToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CsrfToken'] = 'Bearer'

# Configure API key authorization: ClientUuid
configuration.api_key['ClientUuid'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientUuid'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = twitter_openapi_python_generated.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: GuestToken
configuration.api_key['GuestToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['GuestToken'] = 'Bearer'

# Configure API key authorization: SecChUa
configuration.api_key['SecChUa'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUa'] = 'Bearer'

# Configure API key authorization: CookieGt0
configuration.api_key['CookieGt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieGt0'] = 'Bearer'

# Configure API key authorization: ClientTransactionId
configuration.api_key['ClientTransactionId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientTransactionId'] = 'Bearer'

# Configure API key authorization: ActiveUser
configuration.api_key['ActiveUser'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ActiveUser'] = 'Bearer'

# Configure API key authorization: CookieCt0
configuration.api_key['CookieCt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieCt0'] = 'Bearer'

# Configure API key authorization: UserAgent
configuration.api_key['UserAgent'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['UserAgent'] = 'Bearer'

# Configure API key authorization: AcceptLanguage
configuration.api_key['AcceptLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptLanguage'] = 'Bearer'

# Configure API key authorization: SecFetchSite
configuration.api_key['SecFetchSite'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchSite'] = 'Bearer'

# Configure API key authorization: AuthType
configuration.api_key['AuthType'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthType'] = 'Bearer'

# Configure API key authorization: CookieAuthToken
configuration.api_key['CookieAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieAuthToken'] = 'Bearer'

# Configure API key authorization: SecChUaMobile
configuration.api_key['SecChUaMobile'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaMobile'] = 'Bearer'

# Configure API key authorization: AcceptEncoding
configuration.api_key['AcceptEncoding'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptEncoding'] = 'Bearer'

# Enter a context with an instance of the API client
with twitter_openapi_python_generated.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twitter_openapi_python_generated.PostApi(api_client)
    path_query_id = 'lI07N6Otwv1PhnEgXILM7A' # str |  (default to 'lI07N6Otwv1PhnEgXILM7A')
    post_favorite_tweet_request = twitter_openapi_python_generated.PostFavoriteTweetRequest() # PostFavoriteTweetRequest | body

    try:
        api_response = api_instance.post_favorite_tweet(path_query_id, post_favorite_tweet_request)
        print("The response of PostApi->post_favorite_tweet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PostApi->post_favorite_tweet: %s\n" % e)

Parameters

Name Type Description Notes
path_query_id str [default to 'lI07N6Otwv1PhnEgXILM7A']
post_favorite_tweet_request PostFavoriteTweetRequest body

Return type

FavoriteTweetResponse

Authorization

Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

post_unfavorite_tweet

UnfavoriteTweetResponse post_unfavorite_tweet(path_query_id, post_unfavorite_tweet_request)

unfavorite Tweet

Example

  • Api Key Authentication (Accept):
  • Api Key Authentication (ClientLanguage):
  • Api Key Authentication (Priority):
  • Api Key Authentication (Referer):
  • Api Key Authentication (SecFetchDest):
  • Api Key Authentication (SecChUaPlatform):
  • Api Key Authentication (SecFetchMode):
  • Api Key Authentication (CsrfToken):
  • Api Key Authentication (ClientUuid):
  • Bearer Authentication (BearerAuth):
  • Api Key Authentication (GuestToken):
  • Api Key Authentication (SecChUa):
  • Api Key Authentication (CookieGt0):
  • Api Key Authentication (ClientTransactionId):
  • Api Key Authentication (ActiveUser):
  • Api Key Authentication (CookieCt0):
  • Api Key Authentication (UserAgent):
  • Api Key Authentication (AcceptLanguage):
  • Api Key Authentication (SecFetchSite):
  • Api Key Authentication (AuthType):
  • Api Key Authentication (CookieAuthToken):
  • Api Key Authentication (SecChUaMobile):
  • Api Key Authentication (AcceptEncoding):
import twitter_openapi_python_generated
from twitter_openapi_python_generated.models.post_unfavorite_tweet_request import PostUnfavoriteTweetRequest
from twitter_openapi_python_generated.models.unfavorite_tweet_response import UnfavoriteTweetResponse
from twitter_openapi_python_generated.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://x.com/i/api
# See configuration.py for a list of all supported configuration parameters.
configuration = twitter_openapi_python_generated.Configuration(
    host = "https://x.com/i/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Accept
configuration.api_key['Accept'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Accept'] = 'Bearer'

# Configure API key authorization: ClientLanguage
configuration.api_key['ClientLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientLanguage'] = 'Bearer'

# Configure API key authorization: Priority
configuration.api_key['Priority'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Priority'] = 'Bearer'

# Configure API key authorization: Referer
configuration.api_key['Referer'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'

# Configure API key authorization: SecFetchDest
configuration.api_key['SecFetchDest'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchDest'] = 'Bearer'

# Configure API key authorization: SecChUaPlatform
configuration.api_key['SecChUaPlatform'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaPlatform'] = 'Bearer'

# Configure API key authorization: SecFetchMode
configuration.api_key['SecFetchMode'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchMode'] = 'Bearer'

# Configure API key authorization: CsrfToken
configuration.api_key['CsrfToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CsrfToken'] = 'Bearer'

# Configure API key authorization: ClientUuid
configuration.api_key['ClientUuid'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientUuid'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = twitter_openapi_python_generated.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: GuestToken
configuration.api_key['GuestToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['GuestToken'] = 'Bearer'

# Configure API key authorization: SecChUa
configuration.api_key['SecChUa'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUa'] = 'Bearer'

# Configure API key authorization: CookieGt0
configuration.api_key['CookieGt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieGt0'] = 'Bearer'

# Configure API key authorization: ClientTransactionId
configuration.api_key['ClientTransactionId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientTransactionId'] = 'Bearer'

# Configure API key authorization: ActiveUser
configuration.api_key['ActiveUser'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ActiveUser'] = 'Bearer'

# Configure API key authorization: CookieCt0
configuration.api_key['CookieCt0'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieCt0'] = 'Bearer'

# Configure API key authorization: UserAgent
configuration.api_key['UserAgent'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['UserAgent'] = 'Bearer'

# Configure API key authorization: AcceptLanguage
configuration.api_key['AcceptLanguage'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptLanguage'] = 'Bearer'

# Configure API key authorization: SecFetchSite
configuration.api_key['SecFetchSite'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecFetchSite'] = 'Bearer'

# Configure API key authorization: AuthType
configuration.api_key['AuthType'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthType'] = 'Bearer'

# Configure API key authorization: CookieAuthToken
configuration.api_key['CookieAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CookieAuthToken'] = 'Bearer'

# Configure API key authorization: SecChUaMobile
configuration.api_key['SecChUaMobile'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SecChUaMobile'] = 'Bearer'

# Configure API key authorization: AcceptEncoding
configuration.api_key['AcceptEncoding'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AcceptEncoding'] = 'Bearer'

# Enter a context with an instance of the API client
with twitter_openapi_python_generated.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twitter_openapi_python_generated.PostApi(api_client)
    path_query_id = 'ZYKSe-w7KEslx3JhSIk5LA' # str |  (default to 'ZYKSe-w7KEslx3JhSIk5LA')
    post_unfavorite_tweet_request = twitter_openapi_python_generated.PostUnfavoriteTweetRequest() # PostUnfavoriteTweetRequest | body

    try:
        api_response = api_instance.post_unfavorite_tweet(path_query_id, post_unfavorite_tweet_request)
        print("The response of PostApi->post_unfavorite_tweet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PostApi->post_unfavorite_tweet: %s\n" % e)

Parameters

Name Type Description Notes
path_query_id str [default to 'ZYKSe-w7KEslx3JhSIk5LA']
post_unfavorite_tweet_request PostUnfavoriteTweetRequest body

Return type

UnfavoriteTweetResponse

Authorization

Accept, ClientLanguage, Priority, Referer, SecFetchDest, SecChUaPlatform, SecFetchMode, CsrfToken, ClientUuid, BearerAuth, GuestToken, SecChUa, CookieGt0, ClientTransactionId, ActiveUser, CookieCt0, UserAgent, AcceptLanguage, SecFetchSite, AuthType, CookieAuthToken, SecChUaMobile, AcceptEncoding

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]