Code
33
SDK error · code 33
What it means
apiEndpointBlockedError (code 33) means the SDK could not connect to its host and that host resolves to 127.0.0.1 or 0.0.0.0, the way a DNS ad blocker answers. It also fires when the proxy URL is localhost and nothing the device can reach is listening there. Use a host the device can reach, and turn off DNS blocking.
Code
33
iOS (Swift)
ErrorCode.api
Android (Kotlin)
No matching code in the Android SDK; see the causes below.
Causes
cannotConnectToHost) to a URL whose host resolves to 127.0.0.1 or 0.0.0.0, and then reports a blocked endpoint (DNSChecker.swift). Apple describes cannotConnectToHost as a failed attempt to connect to a host (Apple docs).0.0.0.0. The SDK's own message says requests to RevenueCat are being blocked (rev.cat/dnsBlocking).http://localhost:8787, with the server stopped, on a device where localhost resolves to the device itself.Fix
Open the SDK's host or your proxy URL in the device's browser. If it does not load, the problem is the network path, not your app.
Allow the SDK's host in the ad blocker or private DNS profile, or test on another network.
Use https://api.revenuedot.app on RevenueDot Cloud. For a local test server, use an address the device can reach, such as your computer's LAN address or a tunnel. On an Android emulator use 10.0.2.2.
If the URL is right, check that the server is running and listening on that port.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .apiEndpointBlockedError {
// handle api endpoint blocked
} On RevenueDot: With a proxy URL, the SDK's DNS check runs against your RevenueDot host. A server on localhost that is not running therefore shows up as this error, not as a plain networkError. See common problems for emulator and cleartext rules.
FAQ
The SDK's host failed to connect and resolved to 127.0.0.1 or 0.0.0.0, which is what DNS ad blockers return. Allow the host, or test on another network.
The proxy URL is localhost, the server is not reachable, and localhost resolves to 127.0.0.1. Start the server, or use an address the device can reach.
In React Native, compare error.code with PURCHASES_ERROR_CODE.API_ENDPOINT_BLOCKED. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.apiEndpointBlocked.
Get started
Building and testing are free, and you can test your first purchase before you have a store account. Pro costs $0 until your apps make $10,000 a month.
Already have an account? Sign in · Switching from RevenueCat? Change one line