2. Create the First API Client
In order to authenticate with the API you must first register a client key and secret. This is a client for the Admin API, not an Application and key / secret for interfacing with the Ed-Fi ODS / API.
Client registration is done by sending a url-encoded form request to
/connect/register. The ability to register new clients is similar to adding users in Admin App. By default, this endpoint is only available when no clients have been created. After the first client is created, the endpoint is disabled. The endpoint can be re-enabled with the
Authentication/AllowRegistration setting or environment variable (
false by default).
Only Enable Registration When Necessary
/connect/register endpoint does not require any authentication, it is recommended that it remains disabled when not registering a new client. Admin API v1.0 does not include any scope limitations, so all clients are able to utilize all endpoints.
The sample below is using
curl, however this request can be performed from Postman, the Swagger site, or from your application.
After registering the client, verify it was created by retrieving an authorization token.
This should return a JSON result including a bearer token. Note that the above request does not include a request scope, so the token will be invalid for accessing most endpoints. See Securing Admin API for more info.
Optional - Self-Signed Certificates
If using a self-signed certificate for a developer or other non-production instances of Admin API, add "Encrypt=False" to appSettings.json in the ConnectingStrings section to allow them to function. Below is a screen capture of the error that will display using self-signed certificates. The ASP.NET Core client does not trust these certificates by default and this parameter will allow development environments to continue with self-signed certificates.