Authentication

All API requests require authentication, in the form of an API Key, that will be provided when you create an integration. Send us a message at [email protected] to start an integration and get an API Key.

API Key types

HeyGov uses 2 types of api keys: secret and public.

  • secret keys: these give read and write access to resources & entities, use them from a backend that creates forms, submissions, events, etc

  • public keys: these keys give read access to a municipality's data, and can be used on a public website. Examples: display a calendar of events, list meetings, show the 311 widget.

API Keys usage methods

API Keys can be used for authentication in 2 ways:

  • Use apiKey URL parameter:

https://api.heygov.com/heyville.org/forms?apiKey=pk_abc123
  • Use Authorization header (coming soon)

fetch('https://api.heygov.com/heyville.org/forms', {
	method: "GET",
	headers: {
		Authorization: "Bearer sk_abc123"
	}
})

Last updated