API key Endpoint
Note
The examples below use API endpoints from the live COPO website.
To use the demo website instead, replace https://copo-project.org/api/
with https://demo.copo-project.org/api/ in the URLs.
Tip
To view details of the endpoint, click the
Show endpoint details button.Then, inside that section, click the
Show API query parameters button to see input parameter details.
Obtain an API key for authentication
Show endpoint details
Show API query parameters
Note
This endpoint allows users to obtain an API key for authentication purposes. The API key is required for accessing certain API methods that require user authentication.
username (required): The username of the individual for whom the API key is being requested.
password (required): The password of the individual for whom the API key is being requested.
Usage
Please include at least the
usernameandpasswordparameter values in the API URL to obtain an API key for authentication. Replace<username>and<password>with the desired values.https://copo-project.org/api/apiKey$ curl -X POST "https://copo-project.org/api/apiKey" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "username=<username>&password=<password>"
Example
To create an API key for the user with username
janedoeand passwordpassword123, use the following URL:$ curl -X POST "https://copo-project.org/api/apiKey" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "username=janedoe&password=password123"
