Repository navigation
fix: URL-encode api_key in generic API helpers - #19
Merged
Merged
Conversation
Use EncodeParam for api_key query values in zbgeneric.pas. Co-authored-by: Cursor <cursoragent@cursor.com>
Support verify_plus, activity_data, timeouts on validate/validatebatch and parse active_in_days/active_first_seen. Co-authored-by: Cursor <cursoragent@cursor.com>
Add TZbScoreEmailResult, ZBFormPostRequest, and unit tests aligned with JS scoreEmail parity. Co-authored-by: Cursor <cursoragent@cursor.com>
Add ZbPriority3 unit with bulkapi parity and FPCUnit coverage for validateS3file. Co-authored-by: Cursor <cursoragent@cursor.com>
Add form-encoded POST option on single validate (alongside GET) and GET listS3files on bulkapi root, with unit tests and API parity doc updates.
HTML pages, empty bodies, and account-level batch failures were reaching callers as raw payloads or successes. The offline suite talks to 127.0.0.1 so the default FPCUnit run checks every endpoint without the network. Co-authored-by: Cursor <cursoragent@cursor.com>
franciscbalint
added a commit
that referenced
this pull request
Oct 23, 2026
…TP bulk Rebuilt on top of main after PR #19 landed, which already brought TZbValidateOptions, real-time AI scoring, the filters, the list evaluator and the first four S3 jobs in a ZbPriority3 unit. This branch now adds only what is still missing, on main's structure, rather than a second copy of that work. Ports the rest of 407f0a8 and b0444f8 from the Python SDK: - TZbValidateOptions gains DomainInfo, GreylistProcessing and CallbackUrl. A -1 field is not sent; booleans go on the wire as the strings true/false. CallbackUrl is where the greylist retry posts its result, so it is rejected without GreylistProcessing = 1, and when blank, before any request is sent. - TZbValidationResult carries DomainWebsiteExists, DomainRegistrantCompanyName and Message. - ZbEmailFinderS3File and ZbDomainSearchS3File, from https://www.zerobounce.net/docs/api-integrations/amazon-s3-bulk-api - ZbValidateSFTPFile, ZbScoreSFTPFile, ZbEmailFinderSFTPFile, ZbDomainSearchSFTPFile and ZbExportSFTPFile, from https://www.zerobounce.net/docs/api-integrations/sftp_bulk_api All six share TZbBulkFileJobOptions and P3BulkRootFileJob. - The Inbox Placement Tester: the API key goes on the query string, bodies are camelCase JSON, and unset fields are left out. ZbUtility gains ZbListEvaluatorURL and ZbInboxPlacementURL, ZBSendRequest (explicit method plus optional body, which the Tester's PUT and DELETE need), EncodePathSegment, and ZbLastRequestMethod / ZbLastRequestBody for the tests. Changed: - ZbGetListEvaluatorResult uses ZbListEvaluatorURL, encodes the file id as a single path segment, and rejects a blank id before a request is sent. - ZbExportS3File's ExportBucket is optional, matching the documented endpoint: an empty string uses the export bucket from the account's settings. A whitespace-only value is still rejected. The new export test caught this. Fixed: - A validation response without processed_at no longer raises. The greylist-pending response carries Message and no date, and the parser was raising "Invalid date/timestamp" on it. - TTestOffline.TestEndpointsAndOptions was reaching the LIVE API. It points the local stub at ZbApiBaseURL, BULK_URI and ZbBulkRootURL, but the list evaluator had just moved to its own base URL, which still defaulted to bulkapi.zerobounce.net. UseStub now points the two new base URLs at the stub as well. Symptom was the whole --all run hanging; the real response was {"success":"False","message":["api_key is invalid"]}. Tests: 91 run, 0 errors, 0 failures — up from 77 on main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Priority 2 —
/v2/scoring(real-time AI scoring)ZbScoreEmail(GET) andZbScoreEmailPost(form POST) on main API base URLTZbScoreEmailResult(email,score)Priority 3 — bulk finder, list evaluator, filters, S3
ZbPriority3unit: email finder / domain search, list evaluator,ZbSendEvaluatedFile, filters, S3 validate/score/exportTest plan
unit_tests_console --all(72 tests passed, incl.TestValidateS3FileOk)Made with Cursor