API Reference
Request authorization for access to resources
/v1/oauth/authorizeQuery Parameters
The response type, which must be 'code'.
"code"The client identifier.
The URI to which the authorization server will redirect the user-agent with the authorization code.
The scope of the access request.
An opaque value used by the client to maintain state between the request and callback.
The method used to derive the code_challenge, which must be 'S256'.
"S256"A high entropy random challenge generated by the client.
Response Body
application/json
text/plain
curl -X GET "https://example.vii.au01.mattr.global/v1/oauth/authorize?response_type=code&client_id=string&redirect_uri=string&scope=string&code_challenge_method=S256&code_challenge=string"{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}"Unauthorized"Exchange authorization code for access token
/v1/oauth/tokenRequest Body
application/x-www-form-urlencoded
The client identifier.
The grant type, which must be 'authorization_code'.
"authorization_code"The redirect URI that was used in the authorization request.
The authorization code obtained from the authorization endpoint.
SHA256 hash of the code_challenge in the authorization request.
Response Body
application/json
application/json
text/plain
curl -X POST "https://example.vii.au01.mattr.global/v1/oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'client_id=string&grant_type=authorization_code&redirect_uri=string&code=string&code_verifier=string'{
"access_token": "KrrFP8GUeddJJtj7EF-4ugdvCl-dDdWwOqvAbvYsmfy",
"token_type": "Bearer",
"expires_in": 900,
"scope": "mso_mdoc:org.iso.18013.5.1.mDL"
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}"Unauthorized"Issue a verifiable credential
/v1/openid/credentialIn: header
Credential format, always ldp_vc for JSON credentials.
"ldp_vc"JSON object containing proof of possession of the key material the issued Credential shall be bound to.
JSON object containing details for encrypting the issued credential in the response.
Response Body
curl -X POST "https://example.vii.au01.mattr.global/v1/openid/credential" \ -H "Content-Type: application/json" \ -d '{ "format": "ldp_vc", "credential_definition": { "type": [ "VerifiableCredential", "AlumniCredential" ], "@context": [ "https://www.w3.org/2018/credentials/v1" ] }, "proof": { "proof_type": "jwt", "jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." } }'{
"credential": {
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"id": "http://example.edu/credentials/3732",
"type": [
"VerifiableCredential",
"AlumniCredential"
],
"issuer": "https://example.edu/issuers/14",
"issuanceDate": "2020-03-10T04:24:12.164Z",
"credentialSubject": {
"id": "did:example:123",
"alumniOf": "Example University"
},
"proof": {
"type": "RsaSignature2018",
"created": "2020-03-10T04:24:12Z",
"proofPurpose": "assertionMethod",
"verificationMethod": "https://example.edu/issuers/keys/1",
"jws": "EXAMPLE_JWS_TOKEN_eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9aH0..."
}
},
"format": "ldp_vc"
}How would you rate this page?