Basic Response Body Structure
If your request did not succeed, please check HTTP status and error:
A non-existing page was requested with the parameter page.
An invalid or missing application id (appid) was given as a parameter in the request.
An invalid or missing user id (uid) was given as a parameter in the request.
An invalid or missing unique device identifier (device_id) was given as a parameter in the request.
An invalid IP address (ip) was given as a parameter in the request.
An invalid, expired or missing timestamp was given as a parameter in the request.
An invalid or missing language (locale) was given as a parameter in the request.
An invalid or non-existing category (offer/mobile_types) was given as a parameter in the request.
An invalid or missing itemid was given in the request.
An invalid or missing has hashkey for this appid was given as a parameter in the request.
An unknown error happened on the Fyber server.
After successful request
HTTP 200 OK, the response body will contain the offers in the format you chose upon requesting.
Fyber will either respond with
XML for a successful response depending on the format. Both formats follow the same structure, detailed in the following, with examples for both formats.
The complete response will be wrapped inside this element.
The code represents the general outcome of your request. See the table below for more details about all possible response codes. This code will be especially helpful during integration and for debugging.
This element contains a more humanly readable explanation of the general outcome of your request, helping you to quickly identify possible problems.
Note: Don’t use this element message to evaluate the response of your request, as we may change the texts over time. Only use the above mentioned element code for this.
This element contains the total number of offers available, depending on the parameters of your request.
If there are more offers available than the amount that Fyber is responding with to a single request, this parameter will indicate how many more pages of results are available. You can then issue additional requests using the optional parameter page to request all the remaining offers.
This element contains basic information about the application and offers that are being returned, see below.
The title of the application as entered in the Fyber Publisher Control Panel.
application id used by Fyber to identify your specific application. You can find your ID in the Fyber Publisher Control Panel in the ‘Integration’ section of your application. This element should match the
parameter appid of your request.
The name of your currency as entered in the Fyber Publisher Control Panel. This element represents the country of the user, which Fyber derives from the IP given in the request (via
parameter ip). The offers returned are all targeted to users from this country.
This element represents the language used to describe the offers (e.g. the required actions) and should match the locale parameter of your request.
This element represents the customer support URL specific to your app.
This element contains an array of offers returned. Each offer contains more detailed information, as seen below.
This element represents the URL that the user should be sent to upon selecting this offer.
Note: Please open the link in the system browser instead of a web view, as some offers don’t work within the context of a web view.
An identifier of the offer in case you need to identify returned offers across requests.
These elements describe the offer as well as giving a description of the steps needed to complete the offer. If there is no offer specific description available, the element teaser will contain the same content as the element
This element contains URLs to the image used for the offer. Both a high resolution (hires) and a low resolution (lowres) version of the image are included.
This element contains a list of one or more
offer_types attributed to this offer, both as
offer_type_id as well in a human readable format (using the language requested via the locale parameter). A list of all
offer_types can be found below.
This element contains the amount of virtual currency paid out to the user upon completion of the offer. It is calculated using the money payout and the exchange rate setup for your application in the Fyber Publisher Control Panel.
This element contains the amount of seconds a user normally has to wait until the payout is finished after completing an offer, both in the numerical representation as well as in a human readable format (using the language requested via the locale parameter). If the time to payout is unknown, the element will contain “N/A” as a string.
To ensure the integrity and validity of the response, Fyber adds a special security parameter to the HTTP response header. It is called
X-Sponsorpay-Response-Signature,and is created by using rules similar to those for the request signature.
- Concatenate the full response body with your API key.
- Hash the whole resulting string using SHA1.
The use of this parameter is optional but we strongly recommend that you evaluate it on your side to prevent anyone from tampering with any responses sent to you.
Time to handle the rewarding aspect.