Authentication and Bearer Token Usage

LogRhythm SIEM API requires authentication by a Bearer Token. Each API call must include the Bearer Token, otherwise the call is not authorized. To include the Bearer token, you must add a header to your API call, which will then be passed to the API endpoint for authentication.

The example below outlines the format of the bearer token. Include "Authorization" with the "Bearer [API_TOKEN]". Replace [API_TOKEN] with the API key provided during the steps outlined in Register Third-Party Application.

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Bearer [API_TOKEN]")