Rokt Documentation
  • Documentation
  • User Guide
  • SDK
  • API
  • Third-Party Integrations
  • Help

›Events

Getting Started

  • Introduction

Transactions

    Events

    • Overview
    • Authentication
    • POST Events

    Cart

    • Overview
    • POST Reserve Cart Items
    • POST Confirm Cart Items
    • POST Release Cart Items

    Confirmation

    • POST Cancel Confirmed Item

    Placements

    • POST Any Placements

Customer Data

  • Referral Export
  • Transaction Export
  • Custom Audience Import
  • Unsubscribe Import
  • Attributes

Reporting

  • Overview
  • Authentication
  • Account Level

    • GET Account Summary
    • GET Account Campaigns Overview
    • GET Account Campaigns Breakdown
    • GET Account Campaigns Histogram
    • GET Account Transactions Overview
    • GET Account Transactions Breakdown

    Campaign Level

    • GET Campaign Overview
    • GET Campaign Breakdown
    • GET Campaign Histogram

    Creative Level

    • GET Creative Overview
    • GET Creative Breakdown

    Metadata

    • GET Campaign Metadata
    • GET Audience Metadata
    • GET Creative Metadata
    • GET Accounts Metadata

Rokt Calendar

  • Overview
Edit

Authentication

The Event API leverages the Auth0 approach to client integration. See Auth0 Credentials Flow for more details. You will need to use your Rokt Client ID and Client Secret to obtain these credentials. Your Account Manager will provide you with these prior to integration.

To call any endpoint on the Rokt Event API, an access token is needed. Access tokens allow Rokt to identify client apps, the type of data that each client app is accessing, and prevent malicious apps from accessing data that they do not have access to.

When To Call

Call this endpoint to generate an access token which will allow you to interact with the Event API for one hour. If you will need to continue interacting with the API for over an hour, you will need to call this endpoint again to get a new access token.

Sample Request

curl -vX POST  https://api.rokt.com/auth/oauth2/token \
    -H 'Authorization: Basic ${AuthToken}' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'grant_type=client_credentials'

Request Fields

KeyInDescriptionRequired?Example
Authorizationheader"client_id" and "client_secret" must be passed in the authorization header through Basic HTTP authorization and will be provided by your account manager; the header content is "Basic base64encode(client_id:client_secret)"YesBasic base64encocde(12345:abcde)
Content-TypeheaderMedia type of request must always be "application/X-www-form-urlencoded"Yesapplication/X-www-form-urlencoded
grant_typebodyMust be "client_credentials"Yesclient_credentials

Sample Response

{
"Access_token":
"eyJraWQiOiJNMDJyQmZzT3pNKzRVMjhHRjVuaDdIREphWlIwaytDMlwvNFl5dXYxZ2N0ST0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI0MHN2YmluMGQxOTRzdWJwb2hsMDc5cmhjayIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoicmVwb3J0LWFwaVwvcmVhZC1yZXBvcnQtYXBpIiwiYXV0aF90aW1lIjoxNTg1MTEwMDQxLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtd2VzdC0yLmFtYXpvbmF3cy5jb21cL3VzLXdlc3QtMl9kb3dOWnV6VFgiLCJleHAiOjE1ODUxMTM2NDEsImlhdCI6MTU4NTExMDA0MSwidmVyc2lvbiI6MiwianRpIjoiZDFlNjgyMDYtNWVlNy00NThjLTkwODYtZjAwYjhiMjEzYjJhIiwiY2xpZW50X2lkIjoiNDBzdmJpbjBkMTk0c3VicG9obDA3OXJoY2sifQ.NOJIx7qLHFVXqKNZfJKsJlwitOvbHOLdknQ\_D33WjYe8O9ZE08t7LFgs7ANiwBicN5ejmdS7iND0cth5ViUWK5MKZxvLKI6dPG5RljegfpZJtGKqDT\_MFfpayvcOlkkZc5yRw9Bcgz\_fW2ha7q6BGRsUb-e9DZ0Pcb5zL\_HbRLbnvlhYCYi9rPmYOYG6BronvLwB8sg2kVubLQGn\_ASbK\_FW8bKPhqH4BL2\_JunGBzUKJPL9yNvOnFy7VKwlvH1OKUqKlCYbewOtUd1utcMNIb\_AbSGRtzJKslbE5VwQtL5bZ34kOCNH07gSolSGvqqw4dyxU4l0QSVXVmqgVYdKfA",
"expires_in": 3600,
"token_type": "Bearer"
}
← OverviewPOST Events →
  • When To Call
    • Sample Request
    • Request Fields
    • Sample Response
RESOURCES
DocumentationUser GuideSDKAPIIntegration PartnersHelp
COMPANY
About UsContact UsCareersEngineering Blog
Rokt Documentation
Copyright © Rokt 2021 - All Rights Reserved