See api-docs Menu

Get Event by ID

For details about each element in the Event resource and a list of event type IDs, see Event Resource and Types.

Resource URL


Header Parameter




Set to bearer:<access_token>.

Set <access_token> to the access token you generated using the Generate Token API.

The access token must have been generated using an API credential pair created using the scope required to call this API. This API can be called using any one of the following scopes: Read Users, Manage users, Read All, or Manage All.

Resource Parameter




Set to the id of the event that you want to return. If you don’t know the event’s id, use the Get Events API call to return all events and their id values.

Sample Response

    "status": {
        "error": false,
        "code": 200,
        "type": "success",
        "message": "Success"
    "data": [
            "id": 123456,
            "created_at": "2014-02-18T02:34:15.626Z",
            "account_id": 1,
            "user_id": 654321,
            "event_type_id": 8,
            "notes": "Initiated by OneLogin via SAML",
            "ipaddr": "123.456.789.0",
            "actor_user_id": 987654,
            "assuming_acting_user_id": null,
            "role_id": null,
            "app_id": 11111,
            "group_id": null,
            "otp_device_id": null,
            "policy_id": null,
            "actor_system": "",
            "custom_message": null,
            "role_name": null,
            "app_name": "AppWonder",
            "group_name": null,
            "actor_user_name": "Santiago Cuong",
            "user_name": "Santiago Cuong",
            "policy_name": null,
            "otp_device_name": null,
            "operation_name": null,
            "directory_sync_run_id": null,
            "directory_id": null,
            "resolution": null,
            "client_id": null,
            "resource_type_id": null,
            "error_description": null,
            "proxy_ip": null,
            "risk_score": 48,
            "risk_reasons": "Infrequent access from (13%)\nLow trust for session (15%)....",
            "risk_cookie_id": "1cc3xx9-6a0d-4643-8111-b5xx",
            "browser_fingerprint": "71fxxxxxxxxxxxbc184748e5a6b"

Typically, the following error means that your Authorization header value is missing or incorrectly formatted. The Authorization header value should use this format: bearer:<access_token.

    "status": {
        "error": true,
        "code": 400,
        "type": "bad request",
        "message": "Authorization Information is incorrect"

    "status": {
        "error": true,
        "code": 400,
        "type": "bad request",
        "message": {
            "attribute": "id",
            "description": "ID is incorrect"

Typically, this error means that your access token value is invalid.

    "status": {
        "error": true,
        "code": 401,
        "type": "Unauthorized",
        "message": "Authentication Failure"
    "status": {
        "error": true,
        "code": 404,
        "type": "not found",
        "message": "Event for id 111111111 was not found"

Postman Collection

Be sure to set Postman-specific environment variables indicated by {{ }}.

Run in Postman

    Clicking Run in Postman button navigates to the page where you can fork the collection to your workspace. Forking the collection into your workspace will enable you to contribute to the source collection using pull requests. You can also view the collection in a public workspace if you like and even import a copy of the collection using the links present on the screen.

Sample cURL Request

Replace sample values indicated by < > with your actual values.

curl 'https://<subdomain>/api/1/events/<id>' \
-X GET \
-H "Authorization: bearer:<access_token>"

Have a Question?

Found a problem or a bug? Submit a support ticket.

Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.

Have a product idea or request? Share it with us in our Ideas Portal.