Testing connectivity and API keys
Once you have created your account on the sandbox environment and have your API key ready, you can test connectivity from your server and make sure you are ready to start coding.
Testing Raw Connectivity
You can test raw connectivity by hitting the service health API endpoint. Try running the command below to do that.
curl -H 'Accept: application/json' \
-X GET --url https://api-sandbox.circle.com/ping
Successful Response
If you have access to the API endpoint, you should see the response coming as
{"message" : "pong"}
.
Testing Your API Key
You can verify your API key is correctly setup by hitting a read endpoint such as the configuration endpoint. Try running the command below to do that.
curl -H 'Accept: application/json' \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-X GET --url https://api-sandbox.circle.com/v1/configuration
Successful Response
If you don't get an error response, your API key should be correctly set up.
Error Response
If instead you get a response stating your credentials are invalid, you should check that your API key is correct.
Updated over 1 year ago