Testing
When integrating with Validic, we ask that you continually test your integration, including both the authentication process and the flow of new data. Below we walk through how to test the Authentication and Authorization process as well as the correct flow of data from your system to Validic.
Testing Authentication and Authorization
Before building your integration you should be able to manually test the authentication and authorization process.
- With the “consumer” testing
organization_id
and useraccess_token
you should begin by navigating to a Validic Marketplace. These will be in the form of a link provided to you once registered with Validic Connect and are given so you can emulate the full end to end user experience from a “consumer” marketplace, to your application to authenticate and authorize, and back. Below is an example link to a Validic “Consumer” marketplace:
- Find your application among the list of available apps and click the “Connect” button. Validic should redirect you to your Authentication URL (if you have not already given your Authentication URL to Validic please do so).
- Once redirected to your Authentication URL you should see both the signature and sync_url passed in the url as parameters. At this point your application should allow the user to login to your system and then, upon successful login, authenticate with Validic using the uid and signature. However, to test manually you should simply be able to send a cURL request to the sync url and supply a dummy uid and the signature (see Authenticating Users Who Want to Share Data above for the specific POST).
- This request should return a 201 that includes
user
credentials, theapplication
, and theredirect_uri
. - You should then manually navigate to this
redirect_uri
which is a Validic hosted page where you confirm authorization. Once there, click “Authorize” and you should then be returned to the original Validic Marketplace with your application now highlighted as being connected. - You can finally check if a Sync Notification was sent to your Sync Notification url (see Receiving Sync Notifications above).
These steps are also shown through screenshots in the “How it Works” section above. As you build out your application to handle the authentication programmatically, you should continue to walk through this same user experience to ensure everything is working properly.
Testing Correct Flow of Data
Once you receive a Sync Notification you can manually test pushing data to Validic.
- Using your organization
access_token
,organization_id
, and theuser_id
returned in the Sync Notification, you should be able to manually POST a record to Validic. See Submitting User Data above for an example of how to push a single Routine record to Validic. - Assuming your POST was formatted correctly and with the correct credentials, you should see a 201 response with the newly created record in Validic.
- You should then be able to see the data in both your newly created user and also the test user who initiated the authorization. To verify this, you can use the following two GET calls below:
ExampleGET https://api.validic.com/v1/organizations/{YOUR_ORGANIZATION_ID}/users/{VALIDIC_USER_ID}/routine.json?access_token={YOUR_ORGANIZATION_ACCESS_TOKEN}ExampleGET https://api.validic.com/v1/organizations/{TEST_ORGANIZATION_ID}/users/{TEST_USER_ID}/routine.json?access_token={TEST_ORGANIZATION_ACCESS_TOKEN}
For a full list of GET requests by object type see the Objects section of our Documentation.
Manually pushing data to Validic and checking to ensure it correctly shows up will make testing your application’s behavior much easier to understand. As you begin to incorporate this functionality into your application, you should be continually testing by recording sample data in your application and check if it shows up on the test user’s activity data.
Note: If you would like to test with additional “consumer” users rather than repeatedly connected and disconnecting the same “consumer” user, you must provision them with the test organizational credentials:
POST https://api.validic.com/v1/organizations/{TEST_ORGANIZATION_ID}/users.json -H 'Content-Type: application/json' { "user": { "uid": "{UID}" }, "access_token": "{TEST_ORGANIZATION_ACCESS_TOKEN}" }
Note: The UID represents what would be a unique identifier in the 3rd party’s system. Please see the provisioning section of the main docs for more details.
Finalizing Your Integration
Once you have tested your integration from end to end with the testing credentials Validic provided (the marketplace URL you were given along with you organization ID and authentication token) and feel comfortable that it works please submit the following to product-support@validic.com:
- Sync URL: This is the url that will link users to your authentication page after they click on your app in the “consumer” marketplace. It should look something like this:
- Notification URL: This is the URL that will provide you with notifications when users sync or disconnect. It should look something like this:
- Image for Marketplace Application: This needs to be a 200 x 200 png file of your logo that we will add to your marketplace app.