Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Single lookups are sent as GET with query parameters. Batch (2+) lookups use POS

- `StaticCredentials`: Auth ID + Auth Token (server-to-server)
- `SharedCredentials`: Web Token + Referer (browser/mobile)
- Embedded/website keys are GET-only — not valid for batch (POST) requests or the US Extract API (POST-only): https://www.smarty.com/docs/cloud/authentication

### Test Mocks

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/examples/UsExtractExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
public class UsExtractExample {
public static void main(String[] args) {
// We recommend storing your authentication credentials in environment variables.
// for client-side requests (browser/mobile), use this code:
// SharedCredentials credentials = new SharedCredentials(System.getenv("SMARTY_AUTH_WEB"), System.getenv("SMARTY_AUTH_REFERER"));
// The US Extract API is POST-only and embedded keys are restricted to GET, so this
// API requires secret keys: https://www.smarty.com/docs/cloud/authentication
BasicAuthCredentials credentials = new BasicAuthCredentials(System.getenv("SMARTY_AUTH_ID"), System.getenv("SMARTY_AUTH_TOKEN"));

try (Client client = new ClientBuilder(credentials).buildUsExtractApiClient()) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/examples/UsStreetMultipleAddressesExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
public class UsStreetMultipleAddressesExample {
public static void main(String[] args) {
// We recommend storing your authentication credentials in environment variables.
// for client-side requests (browser/mobile), use this code:
// SharedCredentials credentials = new SharedCredentials(System.getenv("SMARTY_AUTH_WEB"), System.getenv("SMARTY_AUTH_REFERER"));
// Batch requests are sent via HTTP POST. Embedded keys are restricted to GET, so
// batches require secret keys: https://www.smarty.com/docs/cloud/authentication
BasicAuthCredentials credentials = new BasicAuthCredentials(System.getenv("SMARTY_AUTH_ID"), System.getenv("SMARTY_AUTH_TOKEN"));

try (Client client = new ClientBuilder(credentials)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/examples/UsZipCodeMultipleLookupsExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
public class UsZipCodeMultipleLookupsExample {
public static void main(String[] args) {
// We recommend storing your authentication credentials in environment variables.
// for client-side requests (browser/mobile), use this code:
// SharedCredentials credentials = new SharedCredentials(System.getenv("SMARTY_AUTH_WEB"), System.getenv("SMARTY_AUTH_REFERER"));
// Batch requests are sent via HTTP POST. Embedded keys are restricted to GET, so
// batches require secret keys: https://www.smarty.com/docs/cloud/authentication
BasicAuthCredentials credentials = new BasicAuthCredentials(System.getenv("SMARTY_AUTH_ID"), System.getenv("SMARTY_AUTH_TOKEN"));

try (Client client = new ClientBuilder(credentials).buildUsZipCodeApiClient()) {
Expand Down