1. Building
Salla Platform Docs
  • Introduction
  • Resources
  • Foundations
    • Introduction to Salla Partners
    • Planning Your App
  • Building
    • Secure Your App
    • Development Preparation
    • AI for Commerce
    • Core Development
  • Launch & Grow
    • Publishing Your App
    • Growing Your App
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight (React)
  • Twilight SDK
  • Web Components (Deprecated)
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Twilight Engine (Deprecated)
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla Apps Playbook
  • Salla CLI
Merchant
Merchant
  • Merchant API
  • Embedded SDK
  • Salla OAuth 2.0
Storefront
Storefront
  • Twilight (React)
  • Twilight SDK
  • Web Components (Deprecated)
  • Ecommerce Events
  • Component Bundle
  • Checkout APIs
  • Twilight Engine (Deprecated)
  • Change Log
App Functions
Partner APIs
Partner APIs
  • App API
  • Shipments & Fulfillment APIs
  • Salla AWB
  • Recurring Payments API
  • Billing System Salla partners
  • Communication Apps
Dev Tools
Dev Tools
  • Partners Agent Kit
  • Salla Apps Playbook
  • Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Building

Secure Your App

Every call your app makes to the Salla Merchant API carries your app's access token. If that token leaks, anyone who holds it can call the API as your app. App Trusted IPs lets you decide where those calls may come from: specific IP addresses, IP ranges, or whole networks (ASNs) limited to the countries you choose.
This article explains what each option means, how to update your app's security settings in the Partners Portal, and how to protect apps on serverless or cloud platforms, where IP addresses change all the time.
What's new
App Trusted IPs now accepts networks (ASNs) and allowed countries, besides IP addresses. The earlier article, Secure your Apps with the Trusted IP Address now!, covers IP addresses only. If your list holds only IP addresses, nothing changes for you.

App Trusted IPs#

What This Is#

App Trusted IPs is a card on your app's page in the Partners Portal. It holds the list of sources that may use your app's tokens:
IP address
One public IPv4 or IPv6 address, for example 5.6.7.8.
IP range
An IPv4 range from /16 to /32, for example 15.185.0.0/16.
Network (ASN)
Every address of one network, for example AS16509. Needs at least one allowed country.
Allowed country
Limits your networks to calls from these countries. Applies to networks only.

Why It Matters#

When you restrict where a token can be used, a stolen token alone is not enough: the caller must also come from a source you trust.

When to Use This#

Use it for every app that is live with merchants. To choose the right kind of entry, see "IP, network or country: which to use" below.

How It Works#

Salla checks every call made with your app's token, in this order:
1
No entries: no restriction
An empty list means any address can use your app's tokens. This is the default.
2
The IP matches: allowed
If the caller's IP address is in your list, or inside one of your ranges, the call is allowed. Countries are not checked for IP entries.
3
Otherwise, network and country must both match
The call is allowed only when the caller's network is in your list and the caller's country is one of your allowed countries.
4
Anything else is blocked
The call is rejected with HTTP 401.

What Is an ASN?#

ASN stands for Autonomous System Number. It is the number that identifies a network on the internet. Every internet provider, cloud company and hosting company has one or more.
Every public IP address belongs to a network, almost always to exactly one. Think of a city: an IP address names a single house, and an ASN names the whole street. An IP list allows single houses. A network entry allows the whole street.
Serverless and cloud platforms move your app between machines. Each machine can have a different IP address, so your app's address changes. The network usually stays the same, because the provider owns those addresses.

How the Portal Shows a Network#

The card shows a network as a chip with its number and the provider's name, for example AS24940 Hetzner (Figure S.1). Well-known cloud and hosting networks also carry a "Shared network" tag: other customers of the same provider use that network too. Quick add groups your recent calls by network in the same way (Figure S.5).

Find Your Provider's Network#

The easiest way is Quick add: it shows the network of your recent calls made with your app's token. If Quick add has no rows yet:
1.
From inside your running app, call a public "what is my IP" service to learn its outbound address.
2.
Look that address up in a public IP-to-ASN or BGP lookup tool. Note the origin ASN.
3.
Repeat for a few calls and for each region you use. Large providers run more than one network.
Well-known provider networks, checked against public routing data in November 2026:
ProviderNetwork (ASN)
Amazon Web ServicesAS16509, AS14618
Google CloudAS396982, AS15169
Microsoft AzureAS8075
CloudflareAS13335
DigitalOceanAS14061
HetznerAS24940
Providers add and change networks. Always confirm with your own calls.

IP, Network or Country: Which to Use#

EntryUse it whenWhat it allows
IP addressYour server has a fixed public address.That one address. The narrowest choice.
IP rangeYou use a fixed block of addresses.Every address in the block (IPv4, /16 to /32).
Network (ASN)Your app runs on serverless or cloud hosting, and its address changes.Every address of that network, from your allowed countries only.
CountryAlways together with a network.Narrows your networks to calls from these countries. It does not apply to IP entries.

Update Your App's Security Settings#

Follow these steps to add or remove entries. The same steps work for IP addresses, ranges, networks and countries.
1
Open App Trusted IPs
In the Partners Portal, open My Apps and choose your app. Scroll to the App Trusted IPs card (Figure S.1).
2
Add entries
Type an IP address, a range or a network, then press Enter, type a comma, or select the plus button. You can paste several entries at once. Write a network as AS16509 or 16509. Each new entry shows "Not saved" (Figure S.2). If the card cannot accept an entry, it shows the reason instead, for example "Private or reserved address."
3
Choose allowed countries
If you added a network, search for a country by name or code under Allowed countries, then select it (Figure S.3). A network cannot be saved without a country.
4
Remove entries
Select the × button on an entry. It shows "Will be removed" until you save, and Undo brings it back. "Discard" drops every unsaved change.
5
Review before saving
Select "Review and save". Check the Adding and Removing lists and any shared-network warning. "Check impact" shows which recent calls the new list would block (Figure S.4). On some versions of the Portal there is no review panel: the "Save changes" button saves directly.
6
Save
Select "Save changes". On an empty list the button reads "Save and enforce": from then on, calls from any other source are rejected. Changes apply within about a minute.
7
Test with a real call
Call the Merchant API from your server with your app's token and confirm it succeeds.
The App Trusted IPs card with the Enforcing badge, a saved network AS24940 with its provider name and a Shared network tag, and Germany as the allowed country
Figure S.1 - The App Trusted IPs card with one network and one allowed country
The App Trusted IPs card with a new network entry marked Not saved and a count of unsaved changes
Figure S.2 - A network typed into the card, waiting to be saved
The Allowed countries search field with Saudi typed and Saudi Arabia offered as a result
Figure S.3 - Searching the country list by name
The Review before saving panel listing one network being added, another network being removed, and a warning that the new network is shared
Figure S.4 - Review before saving: what is added, what is removed, and the shared-network warning
Removing every entry turns the restriction off. These limits apply to every list:
RuleDetail
EntriesUp to 10 IP addresses, ranges and networks together. The card shows your limit.
CountriesUp to 10. Required with a network. Not used for IP entries.
IP addressesPublic only. Private, reserved and documentation addresses are refused.
IP rangesIPv4 only, from /16 to /32. For IPv6, add single addresses.
NetworksPublic ASNs only. Private and reserved ASNs are refused.
Best Practices
Use the narrowest entry that works: a single IP before a range, a range before a network.
Test with a real call after every change.
Common Mistakes
Saving your laptop's address, then calling from your server. Add the address your server uses.
Adding a private address such as 10.0.0.1. Salla sees your public address only.

Serverless Apps (ASN Support)#

What This Is#

Serverless and cloud platforms do not give your app a fixed outbound address, so an IP list cannot keep up. A network entry allows every address of your provider's network. The allowed countries narrow it to where your app calls from.

Why It Matters#

Without any entry, a leaked token works from anywhere. With a network and a country, it works only from your provider's network in the countries you chose. That is a real reduction, but it is wider than an IP list.
Shared networks: the trade-off
A cloud network is shared by every customer of that provider. Anyone hosted there, in one of your allowed countries, could call your API with a stolen token. The card tags well-known cloud networks as "Shared network" and warns you before you save. Keep your tokens secret, choose few countries, and add specific IPs whenever you can.

When to Use This#

Your app runs on functions, containers or edge runtimes without a fixed outbound IP.
If your provider can give you a fixed outbound IP (a static address or a NAT gateway), prefer that IP.

How It Works, Step by Step#

1
Make a call from your app
Deploy your app and make at least one Merchant API call with its token, so Salla has seen where your app calls from.
2
Open Quick add
On the App Trusted IPs card, select "Quick add". It lists the last 48 addresses that called the API with your app's tokens, newest first, grouped by network, with the country of each. A green badge such as "Network allowed" marks calls your saved list accepts. A red badge such as "1 of 1 blocked" marks calls it rejects.
3
Allow the network
Select "Allow network" on your provider's row, then "Add selected". The card adds the network and the country of those calls. If the address is fixed, allow only the IP instead.
4
Check the countries
The country is where the calling address is located, as Salla sees it. It can differ from where you think your servers run. Keep only the countries your app calls from.
5
Review, save and test
Read the shared-network warning, save, then make a call and confirm it succeeds.
The Quick add window listing two recent networks from Germany: the saved network marked Network allowed, with its address allowed by network and country, and a second shared cloud network marked 1 of 1 blocked with Allow network and Allow 1 IP buttons
Figure S.5 - Quick add: the saved network is allowed, a second cloud network is blocked
Best Practices
Pair every network with the fewest countries that cover your regions.
Check Quick add after you add a region or change providers. Networks marked as blocked show what your list rejects.
Common Mistakes
Adding only one of your provider's networks. Calls from its other networks are blocked.
Choosing your company's country instead of the country of your provider's region.

When a Call Is Blocked#

A blocked call is rejected with HTTP 401 and this message, with the caller's own address in it. The message never shows your list.
Your IP address (5.6.7.8) isn't in the current App's IP whitelist!
Check these points in order:
1.
Open Quick add. A network marked as blocked shows the network and country your list is missing.
2.
Saved in the last minute? Wait about a minute and call again.
3.
If Salla cannot tell the country of a call, a network entry cannot match it. Add the IP address instead.
4.
To lift the restriction while you investigate, remove every entry and save. Add the entries back as soon as you can.
Modified at 2026-11-19 10:31:29
Previous
Planning Your App
Next
Development Preparation