I'm a developer - how do I test Token of Trust from localhost / development environment?
Welcome! So you want to try Token of Trust against a development server? No problem - below we discuss 2 options: 1) development against a hosted environment and 2) Developing on Localhost.
These pages assume that we're talking about Wordpress but the same concept applies to other development environments as well. If you ended up here and aren't seeing what you need please reach out to success@tokenoftrust.com for more details.
Now... let's get going:
A hosted development environment (or via ngrok.io)
Whether it's pantheon, cloudways or some other hosted environment setting up here is no different than setting up against a production host. Just provision your hosted environment and once you have a domain name for it go to https://app.tokenoftrust.com/hq/register and sign up with that name.
Assuming your host is up and running you should be able to go all the way through and 'Connect' your environment since it's actually on the internet. Please do allow this. If you run into trouble please do reach out to success@tokenoftrust.com.
If you use a service like ngrok.io on localhost follow the instructions on "A hosted development environment (or via ngrok.io above)" using your ngrok.io hostname as your registration / Live Site Domain.
Caveat 1: Developing on localhost is different than other environments primarily bc it's not really on the internet in a way that outside services can easily reach it (via DNS). Because of this some Token of Trust features and functions will not work. For example, Token of Trust delivers webhooks which our plugins and apps do depend upon. Similarly the 'Connect' feature for Wordpress on the HQ / Integrations page will not work. Instead you'll have to setup keys manually as described below.
Caveat 2: Currently localhost only works against sandbox.tokenoftrust.com (replace every "app.tokenoftrust.com" link below with "sandbox.tokenoftrust.com"). We're working on a fix but right now app.tot.com explicitly prevents this from working.
Despite these limitations if you'd like to proceed you can get a basic Token of Trust service up and going on localhost.
The most important thing to know is that when you create your free API keys you should NEVER register using 'localhost'. Instead register for the domain that you plan on eventually running your site on (e.g. "yourdomain.com") or if you don't know pick something. If you're not sure make something up - like YourWholeName.xyz - and since someone will probably use this actual domain name by the time you get here actually use your whole name... and write it down for the next step.
Tip: NEVER register as 'localhost'.
Take the domain you wrote down - this is your Live Site Domain - use it when you register for keys here: https://app.tokenoftrust.com/hq/register. When you go through this process be aware that Token of Trust will NOT auto-connect to your wordpress site (as mentioned earlier). This is because localhost is not a proper domain. You will need to navigate back to Wordpress and setup as described in the screenshot below - click on the manual setup option which should reveal a screen like the one below... follow the directions to setup the api keys.

Again... NEVER use 'localhost' for the Live Site Domain... use the value that appears on the Integration page which if you were following directions should be the value you wrote down when coming up with the domain name. The Token of Trust / License & API page on Wordpress must always match the values on https://app.tokenoftrust.com/hq/guides/integration.
If you do it right the checks to the right of the configuration on the License & API screen (and shown below) should all turn green... and that's it'!!
