AuthKey Authentication

AuthKey Authentication

Sign up for a free trial account

To implement any AfriGIS mapping or data products protected by an AuthKey, sign up for a free trial account by contacting [email protected]. Assistance is available from the 24-hour Call Centre, should it be required.

Three ‘random’ strings will be provided: an App Client ID and App Client Secret as well as an API Key.  These are the same credentials that are used in OAuth2 Authorisation, however only the API Key is used for mapping and data products.

AfriGIS Data and Maps

AfriGIS data and mapping products need to be accessed by passing an AuthKey parameter in the query string.  This will be the OAuth2 API Key provided above.

 

Call the data and mapping service

Make a GET, POST or other request to the provided GeoServer endpoint, typically starting with  https://basemaps.afrigis.co.za/mapservice/ or https://ogc.afrigis.co.za/mapservice/ and append the AuthKey parameter, e.g. &authkey=<your API Key here>
Note: if there are no other query string parameters, the ampersand (&) should probably be a question mark (?).

Error messages

If you receive this error, then please check with the Call Centre that you should be authorised to access the particular layer:

HTTP Status 403 – Forbidden

A very rare error might be HTTP Status 500 –  UsernameNotFoundException, in which case please contact the Call Centre with this information.

 

Exceptions to AuthKey Authentication: AfriGIS APIs and Older AfriGIS APIs

Note that this authentication method only applies to AfriGIS Mapping products.  Most other AfriGIS services require different authentication methods.  Follow the links below for their documentation.

 

References to AfriGIS products using AuthKey