The User Level Reporting API enables you to access reporting data to measure all revenue generated from individual users. This information can be used to optimize retargeting campaigns and accurately measure user lifetime value.
You can query revenue and impressions metrics across the available dimensions. For all supported metrics and dimensions for the User Level Reporting API, click here.
Reporting API Workflow
The publisher makes a POST request using the Client ID and Client Secret to receive the Access Token, as described in Step 1.
Once the request is successful and the Access Token is received, an API Request is made to create a custom report as described in Step 2. A successful response will contain a URL leading to a file containing the custom report. More details can be found in Step 3.
Step 1: Obtaining the Access Token
Fyber's Reporting API uses Access Tokens for authentication purposes. To obtain your Access Token, you must first get your Client ID and Client Secret.
Obtaining your Client ID and Client Secret
Contact your Fyber Account Manager to provide you with your Client ID and Client Secret.
Keep your Client ID and Client Secret safe, as they can be reused in the future.
Using your Client ID and Client Secret make a POST request to receive your Access Token.
The base End Point for the entire process is:
Body: raw (application/json)
- Grant Type must be "client_credentials"
- The credentials are sent according to the OAuth 2.0 protocol
Sample Authentication Response
When an authentication request is successful, you receive the following response in JSON format:
accessToken: The token required to continue the process
expiresIn: 3600 seconds (1 hour)
When a request is unsuccessful, you receive the following response:
Possible Authentication Errors
Set out in the table are a list of possible errors which resulted in an unsuccessful response.
|HTTP Status Code
||When there are missing credentials
||When the credentials are incorrect or cannot be recognized.
Can also occur when your account has been disabled or when the credentials
have been revoked.
||Unexpected errors in Fyber's servers
Step 2: Reporting API Request
Use the access token you received in Step 1 to request your custom report.
The two dimensions that you can query in your request are:
All other dimensions always appear in the report.
The below is an example from the User Level report.
For a full list of supported Metrics and Dimensions per report, click here.
For further descriptions about the terms used in this article, click here.
Make a POST request to receive your report.
Authorization: Bearer <Access Token from Authentication Response>
Body. raw (application/json)
Set out below are examples of both successful and unsuccessful responses.
- The "id" field holds an identifier of the request for later troubleshooting, if required.
- The "url" field holds the URL to be polled (GET request) until the body response (file) is populated.
The table below shows the main errors indicating an unsuccessful response.
|HTTP Status Code
||Authorization header is empty
Authorization header not sent or token is not present in the header
Invalid value undefined supplied to : Query/dateRange: DateRange
Invalid value "XXXXX" supplied to : Query/dateRange: DateRange/end: Date
|If the query sent is not in the expected schema
Date range is not sent in the ISO 8601 format
||Error in Fyber's servers
Step 3: Receiving the Custom Report
To obtain the Custom Report, follow the steps below:
- Receive the URL from the successful response in Step 2
- Click the link. You are redirected to a folder which contains your report.
The URL is valid for three hours.
Additional Information and Restrictions
It is important to take note of the information, restrictions and rules to ensure the reports provided to ensure a successful response.
- All reports are presented in US dollars
- The time zone used is UTC
- The data in the folder is available by 1200 UTC (noon) for the previous 24 hours.
- All dimensions are mandatory.
There are a number of rules that must be observed with regard to the date:
- The date must be in the format of ISO 8601. For example, 2019-10-03
- The date is included in the report
- The date is relevant from 16 February 2020