Testing without surprises
There is no separate test environment: the API you use to test is the same one your production uses. Here you see what you can call without spending anything, what is charged for real and how to test carefully.
4 min readReviewed on
There is no separate environment
Everything is real
With a valid key, every request acts on your organization’s real data and balance. There is no test mode with fake data or test money: what is charged, is charged.
There is a single address, https:, both for testing and for production. What you can do is separate your tests with a key of their own (with its own cost center, to see its usage separately) and with the minimum permissions.
What you can call without spending
These queries are not charged and change nothing. They still count toward your usage limit, like any request.
GET /: checks that your key works.utilities/ ping - The country catalog.
- The organization query, if your key has the
directorypermission. - All the URL Shortener queries: list and view links, statistics, overview, domains and price.
- All the Storage queries, with the
storageservice on your key: summary, usage, retention, price, and the list and detail of files.
With one minor exception: asking for a download link is not charged, but it leaves a note in your organization’s audit log that you asked for it.
What is charged for real
| Operation | What happens with the charge |
|---|---|
| Create a short link or several in bulk | Each created link is charged at your organization’s current price, unless your plan includes it. |
| Visits to a short link | After it is created, each visit by a person is charged. Visits by bots and the previews generated by social networks and chat apps are not. |
| Edit, delete or restore a link | They are not charged by themselves, but they change your data. If restoring or reactivating a link, or extending or removing its expiry, makes it redirect again, its visits are charged again. |
| Storing files in Storage | It is charged for the amount stored and the time (GB-months), not for querying it. The current price is on its endpoint. |
The current price of each product is queried at its price endpoint (URL Shortener, Storage); this documentation does not publish figures so they never go out of date. If there is no balance, the operation is rejected before it is carried out (402) and nothing is charged.
How to test carefully
- 01Start with the ping
Confirm that the key, the header and the network work before touching an endpoint that is charged.
- 02Do not give the URL shortener to a key that must not create links
The
urlshortenerservice is granted in full: with it, a key can also create links, which are charged. While you test other things, use a key without that service, and a bug in your code will not be able to spend balance that way. - 03Test writing with little data
Create one link, not a hundred. Review the full response and go to
GET /to check it ended up as you expected.urlshortener/ links - 04Always send an
Idempotency-Keywhen creatingIf your test is cut off and you retry, a second link is neither created nor charged. How it works.
- 05Put a cap on your tests
Your organization can set a spending limit in Cloud: once it is reached, the operations that are charged are rejected without being carried out (
URLSHORTENER_SPEND_LIMIT_REACHED). - 06Log the
requestIdIf something does not go as you expected, that number lets us find your exact request.
The reference tester sends requests to the real API with your key, and when an operation is charged, creates or deletes, it asks you to confirm before sending it. Even so, it is the same API: treat it as a production call.
For SMS sending over SMPP, the Hablame team creates the account: request access and agree with support on your first tests.
For technical questions, email developers@hablame.co. If you have a production incident, message us on WhatsApp at +57 319 660 0002, 24/7.