Identity API

(0 reviews)
In order to consume Cambridge Assessment APIs, Consumers need valid token. This API is used by all Cambridge Assessment Applications which are secured with Token.

home

Sequence Diagram

resources/InteractionDiagram-bb5f8278-6304-4bd2-a634-3e8b07eb4aad.png

API returns access token based upon the client credentials. These client credentials can be obtained by going to MyApplications page and then selecting the APP for which you want to get the access token.

We currently support client credential and JWT Token grants type.

Use client credentials as grant type when you want to authenticate your application to consume Cambridge Assessment APIs

User password as grant type when you want to authenticate end user to consume Cambridge Assessment APIs

Note: Client credentials differ between non-production and production environments.

End Point details:

Example curls:

curl --location --request POST 'https://apis.cambridgeassessment.org.uk/v1/cambridge.id/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=356d03dd284XXXXXXXXX' \
--data-urlencode 'client_secret=e14114Da832XXXXXXXXXXXX' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=openid'

Sample Response:

{

    "refresh_token_expires_in": "0",
    "api_product_list": "ca-ielts-result-verification-xapi:v1",
    "organization_name": "PROD",
    "developer.email": "abcdef@ttt.edu",
    "token_type": "Bearer",
    "issued_at": "1675861928817",
    "client_id": "356d03dd284XXXXXXXXX",
    "access_token": "ODc0MTlmMjMtYzQ0Ni00YWJkLWFkZjYtNGEzZmXXXXXXXXXXXXXXXXXXXXXXXXXX==",
    "application_name": "0000000-IELTS-ResultVerification-CRM-PROD",
    "scope": "",
    "expires_in": "3600",
    "refresh_count": "0",
    "status": "approved"

}

Body Parameters

NameValuesDescription
grant_type(required)client_credentialsOauth grant types. Supported grant types are "client_credentials", "password", "refresh_token"
client_id(required)bu3DMYBs6lA1ugzbTslARXhbyyDLsbkj (example only – non-functional)Consumer key or Client identifier. Contact support to get your own client credentials
client_secret(required)coz7AIAbFkGybDCC (example only – non-functional)Consumer secret or Client secret. Contact support to get your own client credentials
scopeopenidScope determines level of resource access. openid is optional scope. Multiple scopes can be send as space separated string, Example: openid cie. Supported scopes are cie, ocr, foh
usernameMandatory parameter if grant_type is set as password. Otherwise don't use this parameter
passwordMandatory parameter if grant_type is set as password. Otherwise don't use this parameter
refresh_tokenMandatory parameter if grant_type is set as refresh_token. Otherwise don't use this parameter

Error Codes

HTTP CodeError CodeError Message
40070416Message Not Processed: Mandatory Query Parameter is missing.
40170401Message Not Processed: Invalid Access token. Please provide valid access token.
40170402Message Not Processed: Missing Access token. Please provide valid access token.
40170405Message Not Processed: Access token expired. Please try again with valid token.
40370403Message Not Processed: Not allowed to access requested resource. Please contact support for the access.
40470404Message Not Processed: Requested resource is not found.
50060006Message Not Processed. There is some technical error while processing request. Please report this to Support team.
50370503Message Not Processed: One or more back-end is down. Please try again later.
50470504Message Not Processed: Back-end timed out. Please try again later.

Reviews