API Keys

Users of Socrata APIs now have more flexibility with the ability to authenticate using API Keys. API Keys are personal authentication credentials that you can create and pass in place of a username and password when using HTTP Basic Auth to perform API calls. Keys are owned by a single user and have identical rights, roles, and permissions to that user.

Why Use API Keys?

  • Access Socrata APIs without the risk of embedding your username and password in scripts or code

  • Users on domains that require SSO (and thus without passwords) can access Socrata APIs

  • Create individual keys for different apps or jobs so that if any one needs to be revoked or rotated, other apps are unaffected

  • Change your account password without disrupting apps or rotate API Keys without disrupting logins

How Do I Create an API Key?
 
Navigate to your user profile, then click Edit Account Settings. Next, navigate to the Developer Settings pane:

Screen_Shot_2019-05-10_at_1.48.47_PM.png

Click on Create New API Key and give it a name. Upon clicking Create, you'll then be shown a modal with our API Key ID and Key Secret. Make sure to copy the Key Secret -- you won't be able to see it again!
 
How Do I Delete an API Key? 
You can delete API Keys from the Actions dropdown of the API Key table.
 
How Do I Use my API Key(s)? 
 
Good question! API Keys take the place of your username and password that you would use to sign in through the user interface, and that you are using if you manage any scripts or automations that require user authentication. When you create your API key, you will be provided with a keyID and keySecret, which are analogous to your username and password, respectively. So in your script, simply replace your username with the keyID and password with the keySecret, and you're good to go.

How Many API Keys Can I Associate with an Account?
 
You may have at most 100 API Keys associated with your account.
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.