If you need to upload a batch of QSOs, you can send an ADIF file containing multiple QSOs to Club Log as follows.
Use HTTP POST to send ADIF files to https://clublog.org/putlogs.php. The POST form variables are as follows:
- email: A registered email address in Club Log. This must be a valid email address, not a callsign.
- password: The password to authenticate the email login (please ask the user to provide an Application Password from Club Log - don't send user passwords here).
- callsign: The callsign into which the logs should be uploaded. The callsign must belong to the email address (account).
- clear: If a value of 1 is given, the log will be flushed before the new upload is processed. In all other cases, including if this field is absent, the log will be merged.
- file: A multipart/form-data upload which is used to POST the ADIF file with the form. The filename should be an ADIF, LGS or a ZIP file containing one of those.
- api: An API key to access this interface which you can obtain by emailing the helpdesk.
For a working example, please view the source for https://clublog.org/test_upload.html. This also highlights the need for multipart form data, for example.
Be careful - handle all errors immediately
Successful uploads receive an HTTP response code 200, but you should also allow for error 403 codes, eg. if the credentials are wrong or the log has already been uploaded.
If you don't receive a '200 OK' then you must show the user the error that Club Log returns, and stop sending more requests. If you don't, your user's IP address will very quickly get blocked by Club Log!
Example using cURL
#!/bin/bash API='your-api-key-here' PASS='your-app-password-here' CALL='your-callsign-here' FILE='/Users/michael/Desktop/example.adi' EMAIL='michael@example.com' curl -v -i -X POST \ -F file=@${FILE} \ -F email=${EMAIL} \ -F callsign=${CALL} \ -F password=${PASS} \ -F api=${API} \ https://clublog.org/putlogs.php
Note: as with all Curl commands you must escape content correctly, e.g. consider URL encoding. See https://everything.curl.dev/http/post/url-encode.
Putlogs.php is not for real time uploads
Please don't ever use putlogs.php to try and achieve "real-time" uploads, with just a handful of QSOs in each ADIF called repeatedly.
There is a real time API designed for this purpose: realtime.php. It's documentation is here:https://clublog.freshdesk.com/support/solutions/articles/54906-how-to-upload-qsos-in-real-time
Putlogs.php will block excessive uploads of small files misuse of this feature causes congestion for other, normal ADIF uploads. This will result in your user's IP address being firewalled. While it is fine to send even just one QSO to this API, it is not acceptable to call it repeatedly and rapidly. Thanks for your understanding.