Authorization
If you have received your client ID and client secret, you can request an access token from the Manc.hu backend in the following way:
POST https://manc.hu/api/oauth/token
Send a POST request with the following four fields as form encoded parameters:
Parameter | Value |
---|---|
client_id | <your client ID> |
client_secret | <your client secret> |
grant | client_credentials |
scope | lexicon |
An example in cURL is shown below (fill in both client_id
and client_secret
)
curl -X POST \
https://manc.hu/api/oauth/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'client_id=XXXXX&client_secret=XXXXX&grant=client_credentials&scope=lexicon'
You will receive a response like the following:
{
"access_token": "<token>",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "lexicon"
}
The token in the access_token
field can be used to authenticate when searching for or retrieving a lemma (see Search and Fetch lemma).