Skip to content
Joshua Hiller edited this page Apr 11, 2021 · 16 revisions

CrowdStrike Falcon Twitter URL

Using the OAuth2 service collection

Uber class support Uber class support

Table of Contents

API Function Description
oauth2RevokeToken Revoke a previously issued OAuth2 access token before the end of its standard 30-minute lifespan.
oauth2AccessToken Generate an OAuth2 access token

oauth2RevokeToken

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

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
from falconpy import oauth2 as FalconAuth

falcon = FalconAuth.OAuth2(creds={
     'client_id': falcon_client_id,
     'client_secret': falcon_client_secret
})

PAYLOAD = {
    'token': 'string'
}

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

falcon = FalconSDK.APIHarness(creds={
      'client_id': falcon_client_id,
      'client_secret': falcon_client_secret
   }
)

PAYLOAD = {
    'token': 'string'
}

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

oauth2AccessToken

Generate an OAuth2 access 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
from falconpy import oauth2 as FalconAuth

falcon = FalconAuth.OAuth2(creds={
     'client_id': falcon_client_id,
     'client_secret': falcon_client_secret
})

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

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

falcon = FalconSDK.APIHarness(creds={
      'client_id': falcon_client_id,
      'client_secret': falcon_client_secret
   }
)

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

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

CrowdStrike Falcon

Clone this wiki locally