Transitioning from Sandbox to Production Environment

Transitioning from our Sandbox to Production environment involves updating the API version and Base URL, obtaining an access token via OAuth 2.0, switching to the Production API key, and monitoring request rates and errors.

Welcome to our step-by-step guide to transitioning from the Sandbox to the Production environment for our Public API. This transition enables you to make use of our API for real transactions and data processing, shifting from a testing phase to a live application.

Here's how to make the move:

Step 1: Confirm API Version

Start by ensuring that you are using the correct version of our API, which has been approved for use in the Production environment. This version detail can be found in your API request URL.

Step 2: Update the Base URL

Next, update your Base URL. Replace the Sandbox Base URL (https://sandbox.legislate.tech) with the Production Base URL (https://api.legislate.tech).

Step 3: Implement OAuth 2.0 Client Credentials Grant

In order to securely access the Production environment, you'll need to implement the OAuth 2.0 Client Credentials Grant flow. This will allow you to obtain an access token which is necessary for authorizing your API requests.

  1. We will provide you with a Client ID and Client Secret from your account.
  2. With these credentials, make a POST request to our authorization server (https://login.legislate.ai/oauth/token).
curl --request POST \
  --url https://login.legislate.ai/oauth/token \
  --header 'content-type: application/json' \
  --data '{"client_id":"...","client_secret":"...","audience":"https://api.legislate.tech","grant_type":"client_credentials"}'
  1. Upon a successful request, you'll receive an access token.
    Please include this access token in the 'Authorization' header of your subsequent API requests as 'Bearer {access_token}'.

Step 4: Update Request Rate

Keep in mind that the Production environment might have a different request rate limit compared to the Sandbox environment. Adhering to these rate limits is crucial to maintain uninterrupted service.

Step 5: Test Your Setup

Before going live, we recommend running a few test requests to ensure everything works as expected in the Production environment.

Step 6: Monitor for Errors

Please continue to monitor for any error messages. If you encounter any issues or notice unexpected behavior, please don't hesitate to reach out to our support team.

The Production environment, unlike the Sandbox environment, is intended for real data and transactions. Therefore, it is essential to use it responsibly. Also, please remember to keep your Production API key safe and secure, as it provides access to real, sensitive data. This key should never be shared or committed to your public code repositories.

Should you face any challenges or have further queries, our dedicated team is available around the clock to assist you.

Thank you for your cooperation. We look forward to supporting your experience as you make full use of the capabilities of our API in the Production environment.