Skip to content

Agent User Keys (setup)

John Bradley edited this page Oct 14, 2020 · 8 revisions

Getting an Agent Key and a User Key:

DukeDSClient requires a config file containing an agent_key and a user_key. This requires a Duke NetID.

Steps To Create your Agent and User Keys

Go to the Duke Data Service Portal.

1. Click login

2. Click top left menu button

Top Left Menu Button

3. Click 'Software Agents'

Top Left Menu

4. Click 'ADD NEW AGENT' button

Add Agent Button

5. Fill in data for a new agent and click 'SUBMIT'.

Create Agent

Pick a descriptive name for your software agent as it will be associated with the projects you upload.

6. Click 'CREDENTIALS' on the software agent you just created.

Click Agent

7. Click 'COPY CREDENTIALS TO CLIPBOARD'.

Key Menu Button

You how have your user and agent key in your clipboard.

Create a file at ~/.ddsclient (do not add .txt or any other extension) and paste your clipboard contents into it. It should look similar to this:

{
    "agent_key": "<AGENT_KEY>",
    "user_key": "<USER_KEY>",
    "api_token": "<API_TOKEN"
}

If you need help creating the .ddsclient config file we have the following guides:

Linux/Mac config file permissions

If you are using Linux or Mac you will need to limit permissions of your config file. To do so run the following command:

chmod 600 ~/.ddsclient

Use ddsclient

You should be able to now use ddsclient: README.md

Custom url configuration

If you are working with the uatest or dev servers you will need to add the appropriate url to ~/.ddsclient.

{
    "url": "https://apidev.dataservice.duke.edu/api/v1",
    "agent_key": "<AGENT_KEY>",
    "user_key": "<USER_KEY>",
    "api_token": "<API_TOKEN"    
}