Set up API Key and Token

SurePrep API requires you to use the API Key and API user credentials in FileRoom to get an auth token that can authenticate your API request.
Follow these steps to get API Auth token.
Before you begin, enable
API
for your firm.
  1. Go to
    FileRoom > Admin > API > User Management
    and create an API user.
  2. Select
    Key Management
    then select
    Generate
    .
  3. After generating the API Key, select
    Copy Key
    to copy the API key to your clipboard. You can press
    Ctrl
    +
    V
    to paste the API Key to your code.

Developer Sample

Next, your firm's developers can use the
GetToken (POST)
API call to get an API Auth Token. You will need to provide API user credentials and API Key from previous steps.
// Sample Request with Input Parameters { "userName": "string", "password": "string", "apiKey": "string" } var request = new RestRequest(Method.POST); request.AddHeader("cache-Control", "no-cache"); request.AddHeader("content-Type", "application/json"); request.AddParameter("application/json", "{ userName: 'username', password: 'password', apiKey: 'apikey' }", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
Sample Output:
{ "Token": "d2c43eb0-5b43-449b-857b-6f2d5ff96121", "TokenExpiry": "2019-11-06T22:12:16.4109775Z"}
Use this token for all subsequent requests during that session (until the token expires).
RestRequest request = new RestRequest(methodName, Method. POST);request.AddHeader("AuthToken", authToken);IRestResponse response = client.Execute(request);

Related content

Chat now

error-icon

Triva isn't available right now.

Check out the support page for our phone number and hours

error-close