Skip to content
Joshua Hiller edited this page Aug 30, 2021 · 16 revisions

CrowdStrike Falcon Twitter URL

Using the OAuth2 service collection

Uber class support Service class support

Table of Contents

Operation ID Description
oauth2RevokeToken
PEP8 revoke
Revoke a previously issued OAuth2 access token before the end of its standard 30-minute lifespan.
oauth2AccessToken
PEP8 token
Generate an OAuth2 access token

oauth2RevokeToken

Revoke a previously issued OAuth2 access token before the end of its standard 30-minute lifespan.

PEP8 method name

revoke

Content-Type

  • Consumes: application/x-www-form-urlencoded
  • Produces: application/json

Parameters

Required Name Type Datatype Description
token formData string The OAuth2 access token you want to revoke. Include your API client ID and secret in basic auth format (Authorization: basic <encoded API client ID and secret>) in your request header.

Usage

Service class example (PEP8 syntax)
from falconpy.oauth2 import OAuth2

falcon = OAuth2(client_id="API_CLIENT_ID_HERE",
                client_secret="API_CLIENT_SECRET_HERE"
                )

PAYLOAD = {
    "token": "string"
}

response = falcon.revoke(data=PAYLOAD)
print(response)
Service class example (Operation ID syntax)
from falconpy.oauth2 import OAuth2

falcon = OAuth2(client_id="API_CLIENT_ID_HERE",
                client_secret="API_CLIENT_SECRET_HERE"
                )

PAYLOAD = {
    "token": "string"
}

response = falcon.oauth2RevokeToken(data=PAYLOAD)
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

PAYLOAD = {
    "token": "string"
}

response = falcon.command("oauth2RevokeToken", data=PAYLOAD)
print(response)

oauth2AccessToken

Generate an OAuth2 access token

PEP8 method name

token

Content-Type

  • Consumes: application/x-www-form-urlencoded
  • Produces: application/json

Parameters

Required Name Type Datatype Description
client_id formData string The API client ID to authenticate your API requests. For information on generating API clients, see API documentation inside Falcon.
client_secret formData string The API client secret to authenticate your API requests. For information on generating API clients, see API documentation inside Falcon.
member_cid formData string For MSSP Master CIDs, optionally lock the token to act on behalf of this member CID

Usage

Service class example (PEP8 syntax)
from falconpy.oauth2 import OAuth2

falcon = OAuth2(client_id="API_CLIENT_ID_HERE",
                client_secret="API_CLIENT_SECRET_HERE"
                )

PAYLOAD = {
    "client_id": "string",
    "client_secret": "string",
    "member_cid": "string"
}

response = falcon.token(data=PAYLOAD)
print(response)
Service class example (Operation ID syntax)
from falconpy.oauth2 import OAuth2

falcon = OAuth2(client_id="API_CLIENT_ID_HERE",
                client_secret="API_CLIENT_SECRET_HERE"
                )

PAYLOAD = {
    "client_id": "string",
    "client_secret": "string",
    "member_cid": "string"
}

response = falcon.oauth2AccessToken(data=PAYLOAD)
print(response)
Uber class example
from falconpy.api_complete import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

PAYLOAD = {
    "client_id": "string",
    "client_secret": "string",
    "member_cid": "string"
}

response = falcon.command("oauth2AccessToken", data=PAYLOAD)
print(response)

CrowdStrike Falcon

Clone this wiki locally