Notifications Content API
curl --request GET \
--url https://api.astrozop.com/v2/notification-text \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astrozop.com/v2/notification-text"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.astrozop.com/v2/notification-text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.astrozop.com/v2/notification-text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.astrozop.com/v2/notification-text"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.astrozop.com/v2/notification-text")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astrozop.com/v2/notification-text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"version": "2.0.0",
"data": {
"notification_text": {
"aries": {
"title_with_name": "`username`, A Shift in Your Growth Cycle",
"text_with_name": "Hey `username`, as an Aries, your current focus on growth is setting the stage for a surprising connection...",
"title_without_name": "A Shift in Your Growth Cycle",
"text_without_name": "Your focus on growth is aligning perfectly, but an unexpected opportunity is waiting just around the corner...",
"cta_text": "READ NOW",
"cta_url": "https://1234.read.astrozop.com/horoscope/aries-daily-horoscope-today",
"image_url": "https://static.astrozop.com/assets/images/aries_horoscope_image.png"
},
"taurus": {
"title_with_name": "`username`, A Critical Shift Incoming",
"text_with_name": "Hey `username`, as a Taurus, balancing your career and heart is crucial, but what happens when the two collide?",
"title_without_name": "A Critical Shift Incoming",
"text_without_name": "Today demands a delicate balance between work and life, but an unexpected twist is waiting just ahead.",
"cta_text": "READ NOW",
"cta_url": "https://1234.read.astrozop.com/horoscope/taurus-daily-horoscope-today",
"image_url": null
},
"generic": {
"title_with_name": "`username`, Your Cosmic Alignment Awaits",
"text_with_name": "Hey `username`, you are finding your rhythm today, but what happens when the melody suddenly changes?",
"title_without_name": "Cosmic Alignment and Hidden Shifts",
"text_without_name": "The stars are aligning for a surge of growth and balance, but are you prepared for what comes next?",
"cta_text": "READ NOW",
"cta_url": "https://1234.read.astrozop.com/horoscope",
"image_url": "https://static.astrozop.com/assets/images/generic_horoscope_image.png"
}
}
}
}{
"success": false,
"version": "2.0.0",
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing Bearer token."
},
"request_id": "2a3fbd513a5e5e4fed1577cced8951b6"
}{
"success": false,
"version": "2.0.0",
"error": {
"code": "NOT_FOUND",
"message": "Not Found."
},
"request_id": "9b28b64f3b7f3e9f09e5acf9785cead5"
}{
"success": false,
"version": "2.0.0",
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Retry after the time in the Retry-After header."
},
"request_id": "a3c1e9f04b7d4c2e8f6a5b3d2c1e0f9a"
}{
"success": false,
"version": "2.0.0",
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error."
},
"request_id": "5aa9c7e2d1b04f3a9e8d7c6b5a4f3e2d"
}INTEGRATE ASTROZOP
Astrozop Notifications Content API
Returns today’s push notification content (for the current UTC day) for every sun sign, plus generic content.
GET
/
v2
/
notification-text
Notifications Content API
curl --request GET \
--url https://api.astrozop.com/v2/notification-text \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astrozop.com/v2/notification-text"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.astrozop.com/v2/notification-text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.astrozop.com/v2/notification-text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.astrozop.com/v2/notification-text"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.astrozop.com/v2/notification-text")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astrozop.com/v2/notification-text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"version": "2.0.0",
"data": {
"notification_text": {
"aries": {
"title_with_name": "`username`, A Shift in Your Growth Cycle",
"text_with_name": "Hey `username`, as an Aries, your current focus on growth is setting the stage for a surprising connection...",
"title_without_name": "A Shift in Your Growth Cycle",
"text_without_name": "Your focus on growth is aligning perfectly, but an unexpected opportunity is waiting just around the corner...",
"cta_text": "READ NOW",
"cta_url": "https://1234.read.astrozop.com/horoscope/aries-daily-horoscope-today",
"image_url": "https://static.astrozop.com/assets/images/aries_horoscope_image.png"
},
"taurus": {
"title_with_name": "`username`, A Critical Shift Incoming",
"text_with_name": "Hey `username`, as a Taurus, balancing your career and heart is crucial, but what happens when the two collide?",
"title_without_name": "A Critical Shift Incoming",
"text_without_name": "Today demands a delicate balance between work and life, but an unexpected twist is waiting just ahead.",
"cta_text": "READ NOW",
"cta_url": "https://1234.read.astrozop.com/horoscope/taurus-daily-horoscope-today",
"image_url": null
},
"generic": {
"title_with_name": "`username`, Your Cosmic Alignment Awaits",
"text_with_name": "Hey `username`, you are finding your rhythm today, but what happens when the melody suddenly changes?",
"title_without_name": "Cosmic Alignment and Hidden Shifts",
"text_without_name": "The stars are aligning for a surge of growth and balance, but are you prepared for what comes next?",
"cta_text": "READ NOW",
"cta_url": "https://1234.read.astrozop.com/horoscope",
"image_url": "https://static.astrozop.com/assets/images/generic_horoscope_image.png"
}
}
}
}{
"success": false,
"version": "2.0.0",
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing Bearer token."
},
"request_id": "2a3fbd513a5e5e4fed1577cced8951b6"
}{
"success": false,
"version": "2.0.0",
"error": {
"code": "NOT_FOUND",
"message": "Not Found."
},
"request_id": "9b28b64f3b7f3e9f09e5acf9785cead5"
}{
"success": false,
"version": "2.0.0",
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Retry after the time in the Retry-After header."
},
"request_id": "a3c1e9f04b7d4c2e8f6a5b3d2c1e0f9a"
}{
"success": false,
"version": "2.0.0",
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error."
},
"request_id": "5aa9c7e2d1b04f3a9e8d7c6b5a4f3e2d"
}About this API
This API gives Astrozop publishers fresh content for daily push notifications. People like reading their horoscope every day, and a daily notification is a good way to bring them back to it. Instead of writing notification content yourself, you can pull it from this API each day. Each response contains content for all 12 sun signs, plusgeneric content for users whose birth date you don’t know. Every entry comes in two versions: one that includes the user’s first name, and one without it. You pick the right entry and version for each user, so you never need to send us your users’ personal data.
To use this API, you need an Astrozop and your Bearer token, which you can find under Settings & Admin > API Tokens within the Gamezop Business Dashboard.
How to personalise notifications
For each user:- Pick the sun sign. If you know the user’s birth date, find their sun sign in the table below and use that key from
data.notification_text. If you don’t know their birth date, usegeneric. - Pick the title and text. If you know the user’s first name, use
title_with_nameandtext_with_name, and replace`username`(including both backticks) with the user’s first name. It appears exactly once in each of these strings. Otherwise, usetitle_without_nameandtext_without_name. - Add the link. Send the user to
cta_urlwhen they tap the notification. If your notification has a button, usecta_textas its label.
data.notification_text.aries.title_with_name and replace `username` with Priya.
Use only the month and day of the birth date to find the sun sign:
| Sun sign | Key | Birth dates |
|---|---|---|
| Aries | aries | March 21 to April 19 |
| Taurus | taurus | April 20 to May 20 |
| Gemini | gemini | May 21 to June 20 |
| Cancer | cancer | June 21 to July 22 |
| Leo | leo | July 23 to August 22 |
| Virgo | virgo | August 23 to September 22 |
| Libra | libra | September 23 to October 22 |
| Scorpio | scorpio | October 23 to November 21 |
| Sagittarius | sagittarius | November 22 to December 21 |
| Capricorn | capricorn | December 22 to January 19 |
| Aquarius | aquarius | January 20 to February 18 |
| Pisces | pisces | February 19 to March 20 |
Important notes
- We only provide content in English.
- Use only the user’s first name, not their full name, so that the text reads naturally.
- New content is available every day from 00:00 UTC (05:30 IST). Pull it once a day after that, store it on your server, and send notifications from there. Don’t call the API once for each user.
image_urlcan benull. When it isn’t, the image has a 2:1 aspect ratio.- Each Property ID can make up to 10,000 requests per day. The daily quota resets at 00:00 UTC. Responses include
x-rate-limit-limit,x-rate-limit-remainingandx-rate-limit-resetheaders (401errors don’t). Requests beyond the limit return429, with aRetry-Afterheader giving the number of seconds until the quota resets. - Every response includes an
X-Request-Idheader, and error responses repeat it asrequest_id. Quote it when you contact us about a failed request. You can also send your ownX-Request-Idheader (20 to 200 characters long), and we’ll use it instead of generating one.
Errors
Every error response has the same shape:success: false, version, request_id, and an error object with a code you can handle in your code and a human-readable message. Use error.code, not message, in your code, as messages may change.
| HTTP status | error.code | When it happens | What to do |
|---|---|---|---|
401 | UNAUTHORIZED | The Bearer token is missing or invalid. | Check your token in the Gamezop Business Dashboard. |
404 | NOT_FOUND | The request URL is wrong. | Check the URL. |
429 | RATE_LIMIT_EXCEEDED | You’ve used up your daily quota. | Wait for the number of seconds in the Retry-After header. |
500 | INTERNAL_ERROR | Unexpected server error. | Retry once. If it fails again, contact your Gamezop Account Manager with the request_id. |
API specification
Authorizations
You can find the Bearer token for this API under Settings & Admin > API Tokens within the Gamezop Business Dashboard.
Was this page helpful?