Once you have exchanged keys with Google and have your vendor ID (PIAID), you
are ready to establish connectivity with the Redirect FOP API is to
and complete a successful echo test. We provide
code samples to help you perform these tests
using the encryptions keys we exchange to ensure your configuration is correct
and that your infrastructure is properly routing our requests to your host.
Once you have successfully completed echo
tests using one of our code
samples, you can update your implementation to communicate with our APIs.
Echo from Partner to Google
Google hosts an echo
endpoint
which you can call to test your ability to successfully communicate with our
servers. You should use the encryption keys you exchanged with Google when
forming your echo
request and parsing our response.
Using our code samples to echo Google
Once you have one of our code samples configured
and running, you can trigger an echo
request to Google by using curl
or a
similar tool as follows:
curl -H "Content-type: text/plain" -X POST -d ‘hello’ https://{YOUR_HOST}/echo
If your keys are properly set up, you should see a successful echo response.
Echo request code samples
Debugging errors during initial development to establish connectivity can be difficult since our API returns 404s for requests with PGP encryption errors. And, all responses are encrypted and sent as an octet-stream, which can further complicate initial connectivity work.
There are a number of resources to help you get started:
- Java implementation for encryption and decryption
- Sample code showing how to successfully perform bidirectional
echo
tests - Codelabs that walk through our code samples
Code sample downloads
The following code samples are fully working examples that can call the Google
hosted echo
API. Note that the samples also include code for hosting your
own echo endpoint. The Redirect FOP API does not need that
capability so you should focus your attention on the echo
request to Google's
endpoint.
Codelab walkthroughs
The following codelabs walk through our Java and Node.js sample implementations to help you quickly come up to speed with how they work and the key configuration settings you need to adjust to get them working.