### Installing Dependencies with npm Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/js/express/README.md Installs the required project dependencies listed in the package.json file using the npm package manager. ```Shell npm install ``` -------------------------------- ### Example Execution of Starling API Key Rotator Source: https://github.com/starlingbank/api-samples/blob/master/common-examples/key-rotation/java/rotator/README.md Provides an example command demonstrating how to run the Starling API key rotator with placeholder values for the required arguments. ```shell java StarlingKeyRotator "aaaaaaaa-aaaa-4aaa-aaaa-aaaaaaaaaaaa" "starling-rotation-private.key" "starling-api-public.key" "RSA_SHA512" ``` -------------------------------- ### Install Dependencies (npm) Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/js/http-on-data/README.md Installs the project's dependencies using npm, as specified in the package.json file. ```Shell npm install ``` -------------------------------- ### Running the Node.js Application Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/js/express/README.md Starts the Node.js application by executing the index.js file, which is configured to run on port 8000. ```Shell node index.js ``` -------------------------------- ### Running Starling Webhook Signature Validator Example (Shell) Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/java/validator/README.md Provides an example command demonstrating how to run the validator with specific, example signature and payload values for testing. ```Shell java StarlingWebhookSignatureValidator "rI8mXteeS8sPXEs9FRywLGhbxJV2ae5yGje58ovn3P6wfLXC5xe457VKEgMojMbWF0qDQ4gTogPdA484tgwtPg==" "{\"webhookNotificationUid\":\"606d5b72-863a-452f-96f4-c2acdc104c1d\"}" ``` -------------------------------- ### Running the Go Webhook Verification Server Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/go/http/README.md This command compiles and runs the main Go file, starting the webhook verification server. The server is configured to listen on port 8000. ```Shell go run main.go ``` -------------------------------- ### Run Starling API Message Signer - Java (Example) Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/message-signing/java/signer/README.md Provides a concrete example of running the compiled Java message signer with sample values for the required arguments, demonstrating how to sign a message for a specific API endpoint and payload. ```Shell java StarlingMessageSigner "aaaaaaaa-aaaa-4aaa-aaaa-aaaaaaaaaaaa" "starling-api-private.key" "RSA_SHA512" "put /api/v2/payments/local/account/90d14796-c59f-4944-9146-7fc84deb253c/category/46168325-8d23-4efe-ba48-b3a74f85f23b" "{\"externalIdentifier\":\"7cb1a2e1-812a-49dc-9399-84f45acaff26\",\"destinationPayeeAccountUid\":\"db61037a-c9db-40e9-9507-01e932b114eb\",\"reference\":\"Some reference\",\"amount\":{\"currency\":\"GBP\",\"minorUnits\":1234}}" "eyJhbGciOiJQUzI1NiIsInppcCI6IkdaSVAifQ.H4sIAAQ-_pT1TALVKOt8.uLjFJikw--DDv3Pf" ``` -------------------------------- ### Install Dependencies - Node.js Project Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/js/http-on-end/README.md Installs the necessary project dependencies listed in the package.json file using the npm package manager. ```Shell npm install ``` -------------------------------- ### Install Flask Dependency - Shell Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/python/flask/README.md Installs the required Flask library using pip, the Python package installer. This command should be run in your terminal within the project environment. ```Shell pip install Flask ``` -------------------------------- ### Run Node.js Script Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/js/http-on-data/README.md Executes the main Node.js script (`index.js`) to start the HTTP server, which runs on port 8000. ```Shell node index.js ``` -------------------------------- ### Run Node.js Script - HTTP Server Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/js/http-on-end/README.md Executes the main Node.js script (index.js) which starts the HTTP server, typically listening on port 8000 as mentioned in the text. ```Shell node index.js ``` -------------------------------- ### Run Flask Application - Shell Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/python/flask/README.md Executes the main Flask application script 'app.py' using the Python interpreter. This starts the web server, which runs on port 8000 by default. ```Shell python app.py ``` -------------------------------- ### Running Starling API Key Rotator Java Program Source: https://github.com/starlingbank/api-samples/blob/master/common-examples/key-rotation/java/rotator/README.md Executes the compiled Java program, requiring arguments for the rotation key UID, private rotation key file, public API key file, and signing algorithm. ```shell java StarlingKeyRotator ``` -------------------------------- ### Run Starling API Message Signer - Java (Structure) Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/message-signing/java/signer/README.md Provides the command line structure for running the compiled Java message signer. It shows the required arguments for signing a message. ```Shell java StarlingMessageSigner ``` -------------------------------- ### Compiling Starling API Key Rotator Java Program Source: https://github.com/starlingbank/api-samples/blob/master/common-examples/key-rotation/java/rotator/README.md Compiles the Java source file for the Starling API key rotator using the Java compiler. ```shell javac StarlingKeyRotator.java ``` -------------------------------- ### Compile Starling API Message Signer - Java Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/message-signing/java/signer/README.md Compiles the Java source file for the Starling API message signer using the Java compiler (`javac`). This step is required before running the signer. ```Shell javac StarlingMessageSigner.java ``` -------------------------------- ### Running Starling Webhook Signature Validator (Shell) Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/java/validator/README.md Executes the compiled Java validator program, requiring the webhook signature and payload as command-line arguments. ```Shell java StarlingWebhookSignatureValidator ``` -------------------------------- ### Testing Webhook Verification Endpoint with curl Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v2-webhooks/README.md This curl command sends a POST request to a local webhook verification endpoint (localhost:8000) with a sample JSON body and a mock X-Hook-Signature header. It is used to test the server-side verification logic. ```bash curl -X POST localhost:8000 -H "Content-Type: application/json" -d '{"key":"value"}' -H "X-Hook-Signature: HJszr9xjvi9+i/wG3PLbxev1aWnCCgNqDYtRgIR+dxs+c+CJvw+8s6vm/dVmQGxpLVM9Cwkr7wDjUfoFYtCNHQ==" ``` -------------------------------- ### Compiling Starling Webhook Signature Validator (Shell) Source: https://github.com/starlingbank/api-samples/blob/master/public-api-examples/webhook-verification/v1-webhooks/java/validator/README.md Compiles the Java source file for the Starling webhook signature validator using the standard Java compiler. ```Shell javac StarlingWebhookSignatureValidator.java ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.