...
The following are the URLs for this API.
Environment | URL |
---|---|
Development | POST https://login-dev.mi-cie.org/oauth2/token |
Uat | POST https://login-uat.mi-cie.org/oauth2/token |
Production | POSThttps://login.mi-cie.org/oauth2/token |
Headers
The following will be headers that will need to be supplied
Header | Description |
---|---|
Authorization | If the client was issued a secret, the client must pass its |
ContentType | application/x-www-form-urlencoded |
Body
The following are the body of the request
Value | Description | Example |
---|---|---|
grant_type | This is the grant type this will be client_credentials | client_credentials |
client_id | This will be the client id that was given |
. | 7n5557odet*****4gcdbh17h | |
scope | This is the scope(s) that will be passed in to gain access to the api’s | mi-cie.directory/read |
Example
Code Block |
---|
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=7n5557odet*****4gcdbh17h' \
--data-urlencode 'scope=mi-cie.directory/read'
|
Response
A access token will be returned. This will be a bearer token that can be passed in the header of other API calls to gain access. Please note that this access token is good for 24 hours. It is recommended that the client caches this token for subsequent calls to the API.
HTTP Status Code | Description | Response Example | ||
---|---|---|---|---|
200 | Successful access token is being returned.
|
|
Example CURL for this API Call
...
Code Block |
---|
curl --location --request POST 'https://login-dev.mi-cie.org/oauth2/token' \
--header 'Authorization: Basic Nm01N*******OWkzMHJ1Y3FyNWVvcGR1Z2YwaGduMXNn' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=7n5557odet*****4gcdbh17h' \
--data-urlencode 'scope=mi-cie.directory/read'
|