NewsFeed API¶
Using NewsFeed, You can retrieve NewsFeed via API
For example, let's take the example of using the NewsFeed feature to implement a notification screen.In this case, with the method of getting the NewsFeed via the Repro SDK, you need to implement the entire notification screen on the app side, However, using API, for example, by combining it with the HTML in-app message , it is possible to implement the UI of the notification screen and the process of getting the NewsFeed on Repro, making it easier to implement the NewsFeed function.
Note
Please note that even if you use a combination of the NewsFeed API and HTML In-App Message , the implementation required to introduce NewsFeed function will not be completely eliminated.
Warning
When using In-app Messages and Web Messages as NewsFeeds, please note that the intended behavior may not occur in use cases such as those described below.
Create a campaign,which has a purchase event as trigger, and Use it as NewsFeeds.
NewsFeeds are created independently of campaigns, so even if a campaign is not displayed, it will still be available as a NewsFeed.
Get Started¶
To use NewsFeed API, you need to set the Repro Client token
Get the Repro Client token¶
You can find the
Repro Client Token
at SETTINGS > PRODUCT SETTINGS > Credentials

Access limit per unit time¶
Access is limited per time for NewsFeed API.
The limit is set to 3000 accesses for every 1 minutes per project.
When the request is completed, there will be a notification at the
X-RateLimit-Limit
header showing the maximum number of requests per time.When the request count exceeds the maximum access number, the following response
HTTP Status 429 (Too Many Requests)
will appear.
For more information on response headers, please see Push API responses.
Warning
The maximum access number may fluctuate without warning.
- The access limit setting value is per API token per function.For example, the push API and the user profile API use the same API token, but they are different functions, so even if they are requested at the same time, each is counted as one request.
NewsFeed API¶
Currently, NewsFeed API provides the below functionalities.
Function |
HTTP Method |
Endpoint |
---|---|---|
GET |
GET |
https://api.reproio.com/v3/newsfeeds?device_id={device_id}&campaign_type={campaign_type}&limit={limit}&offset_newsfeed_id={offset_newsfeed_id} |
Update |
PATCH |
https://api.reproio.com/v3/newsfeeds/{newsfeed_id}?device_id={device_id}&shown={shown}&read={read} |
We will provide more details on how to send a request in following description.
Get NewsFeed¶
Executing a GET request
, You can retrieve the latest NewsFeed.
Endpoint¶
Function |
HTTP Method |
Endpoint |
---|---|---|
GET |
GET |
https://api.reproio.com/v3/newsfeeds?device_id={device_id}&campaign_type={campaign_type}&limit={limit}&offset_newsfeed_id={offset_newsfeed_id} |
Request header¶
Header |
Description |
Optional / Required |
---|---|---|
Content-Type | Set application/json |
Required |
X-Repro-Token | Set the token retrieved with Get the Repro Client token |
Required |
Query parameters¶
Field |
Description |
Optional / Required |
---|---|---|
device_id | Device ID of the terminal that executes the acquisition process. For details on how to obtain the device ID, please refer to device ID |
Required |
campaign_type |
|
Optional |
limit |
|
Optional |
offset_newsfeed_id | Offset ID. Please see NewsFeed for more details. |
Optional |
Note
Please note that the period of time that can be retrieved as a newsfeed is for campaigns that were executed within 30 days starting from the date of the API request.
Response header¶
The response header contains the following values.
Status |
Header |
Description |
---|---|---|
Success |
X-RateLimit-Limit |
Access limit per unit time |
Success |
X-RateLimit-Remaining |
The number of requests remaining in the current rate limit window. |
Success |
X-RateLimit-Reset |
The time at which the current rate limit window resets in UTC epoch seconds. (Unix UTC timestamp) |
Success |
|
Parameters for retrieving subsequent NewsFeeds |
Request limited |
Retry-After |
The time how long the user agent should wait before making a follow-up request. |
The response of succeeded¶
The response body contains belows as a response in JSON format.
Field |
Description |
---|---|
newsfeed_id(string) | NewsFeed's ID |
campaign_type(string) | Campaign type. Can be one of push_notification, web_message , in_app_message . |
device_id(string) | Device ID associated with the device. Please see Device ID for more details. |
title(string) | NewsFeed's title |
summary(stinrg) | The value specified in the NewsFeed's summary when creating the campaign. |
body(string) | NewsFeed's body |
shown(boolean) | Value used to control whether or not the NewsFeed was displayed. |
read(boolean) | Value used to manage whether or not the message has been read |
link_url(string) | deep link's URL |
image_url(string) | the Image's URL |
extras(object) | custom payload |
delivered_at(string) | Transmission Date |
Response body example of succeeded¶
[
{
"newsfeed_id": 1,
"campaign_type": "push_notification",
"device_id": "12e4dd50-810a-410a-b046-8ce88729f1a1",
"title": "quae",
"summary": "Quam rerum aut incidunt.",
"body": "Quam rerum aut incidunt.",
"shown": true,
"read": true,
"link_url": null,
"image_url": null,
"extras": null,
"delivered_at": "2021-06-07T09:27:53Z"
}
]
Warning
Please note that a response with no value can be either null or "" .
Error response¶
The list below contains all status codes and error messages of the responses.
400 Bad Request¶
You have an error in your request. Please check the error message.
device_id is not specified.
Response body
{
"error": {
"messages": [
"device_id is missing"
]
}
}
Invalid value specified for limit
Response body
{
"error": {
"messages": [
"limit must be less than or equal 200"
]
}
}
Invalid value specified for campaign_type
Response body
{
"error": {
"messages": [
"unknown campaign_type. valid campaign_type:all,push_notification,in_app_message,web_message"
]
}
}
401 Unauthorized¶
Repro Client token is not specified.
Response body
{
"status": "unauthorized",
"error": {
"messages": [
"Please include your Repro Client Token as \"X-Repro-Token\" HTTP header."
]
}
}
403 Forbidden¶
The specified Repro Client Token is invalid.
Response body
{
"status": "forbidden",
"error": {
"messages": [
"Please check your Repro Client Token as \"X-Repro-Token\" HTTP header."
]
}
}
404 Not Found¶
the item is not found
Response body
{
"status": "not_found",
"error": {
"messages": [
"Entity was not found."
]
}
}
429 Too Many Requests¶
Too many requests. Please wait the seconds indicated in the Retry-After
header and make a follow-up request.
Response body
{
"status": "too_many_requests",
"error": {
"messages": [
"Too many requests hit the API too quickly."
]
}
}
Update NewsFeed¶
You can update the status of a NewsFeed, such as read or view, by executing a PATCH request
.
Endpoint¶
Function |
HTTP Method |
Endpoint |
---|---|---|
GET |
PATCH |
https://api.reproio.com/v3/newsfeeds/{newsfeed_id}?device_id={device_id}&shown={shown}&read={read} |
Request header¶
Header |
Description |
Optional / Required |
---|---|---|
Content-Type | Set application/json |
Required |
X-Repro-Token | Set the token retrieved with Get the Repro Client token |
Required |
Query parameter¶
Field |
Description |
Optional / Required |
---|---|---|
newsfeed_id(string) | The id of the NewsFeed to be updated. |
Required |
device_id(string) | Device ID of the terminal to be updated, Please refer to Device ID for how to get the device ID |
Required |
shown(boolean) | Value for display management |
Optional( required if read is not specified ) |
read (boolean) | The value to manage readings |
Optional( required if shown is not specified ) |
Response header¶
The response header contains the following values.
Status |
Header |
Description |
---|---|---|
Success |
X-RateLimit-Limit |
Access limit per unit time |
Success |
X-RateLimit-Remaining |
The number of requests remaining in the current rate limit window. |
Success |
X-RateLimit-Reset |
The time at which the current rate limit window resets in UTC epoch seconds. (Unix UTC timestamp) |
Request limited |
Retry-After |
The time how long the user agent should wait before making a follow-up request. |
The response of succeeded¶
The response body contains belows as a response in JSON format.
Field |
Description |
---|---|
updated(boolean) | Indicates whether the update process was successful or not. |
Response body example of succeeded¶
{
"updated": true
}
Error response¶
400 Bad Request¶
You have an error in your request. Please check the error message.
device_id is not specified.
Response body
{
"error": {
"messages": [
"device_id is missing"
]
}
}
Neither shown nor read is specified.
Response body
{
"error": {
"message": [
"Either shown or read must be present"
]
}
}
401 Unauthorized¶
Repro Client token is not specified.
Response body
{
"status": "unauthorized",
"error": {
"messages": [
"Please include your Repro Client Token as \"X-Repro-Token\" HTTP header."
]
}
}
403 Forbidden¶
The specified Repro Client Token is invalid.
Response body
{
"status": "forbidden",
"error": {
"messages": [
"Please check your Repro Client Token as \"X-Repro-Token\" HTTP header."
]
}
}
404 Not Found¶
The item to be updated does not exist.
Response body
{
"status": "not_found",
"error": {
"messages": [
"Target newsfeed is not found"
]
}
}
429 Too Many Requests¶
Too many requests. Please wait the seconds indicated in the Retry-After
header and make a follow-up request.
Response body
{
"status": "too_many_requests",
"error": {
"messages": [
"Too many requests hit the API too quickly."
]
}
}