Linux 软件免费装
Banner图

API for Ninja Forms

开发者 sightfactory
更新时间 2026年9月15日 23:22
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

ninjaforms ninja forms api rest api

下载

1.1.0 1.0.1

详情介绍:

API for Ninja Forms is the best, most powerful, and feature-complete REST API solution for Ninja Forms. Effortlessly export and integrate your form submissions with external applications, webhooks, and analytics platforms with unparalleled speed, reliability, and security. Whether you need automated Excel reporting, instant PDF downloads, structured JSON data feeds, or real-time data synchronization, API for Ninja Forms delivers a best-in-class integration experience built for modern developers and business workflows. Why API for Ninja Forms is the Best Choice:

安装:

  1. Download the plugin ZIP file.
  2. Upload the extracted folder to the /wp-content/plugins/ directory.
  3. Activate the plugin through the 'Plugins' menu in WordPress.
  4. Generate a REST API key by navigating to Settings > NF API Keys.
  5. Make authenticated REST requests by including the header: Authorization: Bearer YOUR_API_KEY.

屏幕截图:

  • End-to-end response payload encryption (AES-256-GCM & Sodium Secretbox) with secret key controls.
  • Interactive developer documentation with ready-to-use PHP, JavaScript, and cURL examples.

升级注意事项:

1.1.0 IMPORTANT: 1) GET /form/{id} now defaults to 50 records per page (use ?limit=500 or pagination headers for more). 2) date_submitted now returns standard SQL datetime (YYYY-MM-DD HH:MM:SS) instead of localized text. Verify external integrations before updating. 1.0.0 Initial public release

常见问题:

What API file formats are supported?

JSON, CSV, XLSX (Microsoft Excel), PDF, XML, and NDJSON/JSONL formats are supported.

How do I synchronize new submissions in real-time?

Use cursor pagination with ?since_id={last_synced_id}&order=asc. Your application only receives new submissions created since the last sync.

How do I enable response payload encryption?

Navigate to Settings > NF API Keys in your WordPress dashboard, check "Enable Response Payload Encryption", select your cipher strategy (AES-256-GCM, AES-128-GCM, or Sodium Secretbox), and generate a key. Keep your secret decryption key safe.

Why does an encrypted PDF or XLSX file end in .enc?

Binary files exported with encryption enabled are saved with a .enc file extension (e.g., form-1-submissions-encrypted.pdf.enc). Because the file content consists of raw encrypted bytes, attempting to open the file directly in Adobe Reader or Microsoft Excel without decrypting it first will report a corrupted file error. The .enc extension clearly indicates that the file must be decrypted using your secret key first.

How do I decrypt binary files (PDF & XLSX) using PHP?

Read the binary body and HTTP response headers (X-Crypto-IV, X-Crypto-Tag): ```php $response = wp_remote_get('https://example.com/wp-json/nf-submissions/v1/form/1?format=pdf', [ 'headers' => ['Authorization' => 'Bearer YOUR_API_KEY'] ]); if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { exit( 'Download failed or unauthorized.' ); } $headers = wp_remote_retrieve_headers($response); $binary_key = hex2bin('YOUR_DECRYPTION_KEY'); $iv = base64_decode($headers['x-crypto-iv']); $tag = base64_decode($headers['x-crypto-tag']); $decrypted_pdf = openssl_decrypt( wp_remote_retrieve_body($response), 'aes-256-gcm', $binary_key, OPENSSL_RAW_DATA, $iv, $tag ); file_put_contents('submissions.pdf', $decrypted_pdf); ```

How do I decrypt JSON payloads using PHP?

Parse the JSON response envelope and decrypt using OpenSSL: php $json = json_decode($response_body, true); if (!empty($json['encrypted'])) { $binary_key = hex2bin('YOUR_DECRYPTION_KEY'); $plaintext = openssl_decrypt( base64_decode($json['ciphertext']), $json['algorithm'], $binary_key, OPENSSL_RAW_DATA, base64_decode($json['iv']), base64_decode($json['tag']) ); $data = json_decode($plaintext, true); }

Does this plugin slow down my website?

No. Text feeds use lightweight JSON structures and binary feeds use raw stream transmission to ensure high throughput and low memory usage.

更新日志:

1.1.0 1.0.1 Bugfix 1.0.0 Initial public release