Add a Nice button to your site in 3 steps
Register your domain to get an API token:
curl -X POST https://api.nice.sbs/api/v1/sites \
-H "Content-Type: application/json" \
-d '{"domain": "yoursite.com"}'
Save the token from the response — you'll need it for the next steps.
Add a TXT record to your DNS to prove ownership:
# Add this TXT record to your DNS:
_nice-verify.yoursite.com TXT "nice-verify={verification_token}"
Then verify:
curl -X POST https://api.nice.sbs/api/v1/sites/{site_id}/verify
💡 DNS changes can take up to 24 hours to propagate, but usually work within minutes.
Create your Nice button:
curl -X POST https://api.nice.sbs/api/v1/buttons \
-H "Authorization: Bearer {your_token}" \
-H "Content-Type: application/json" \
-d '{"name": "My Nice Button"}'
Add it to your site with an iframe:
<!-- Add this where you want the button -->
<iframe
src="https://api.nice.sbs/embed/{button_id}?theme=light"
style="border:none;width:100px;height:36px;"
title="Nice button">
</iframe>
Available query parameters:
# Themes: light, dark, minimal
?theme=dark
# Sizes: sm, md, lg
?size=lg
# Combine them
?theme=dark&size=sm
Example:
https://api.nice.sbs/embed/{button_id}?theme=dark&size=md