> For the complete documentation index, see [llms.txt](https://docs.teranode.group/tng-identity-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teranode.group/tng-identity-documentation/tng-identity-verifier/verifier-api/api-documentation/siop.md).

# SIOP

## Initiate verification presentation from the wallet

> Returns JWT token which describes details about the credential being verified. It is made by wallet app to get info about the credential.

```json
{"openapi":"3.0.0","info":{"title":"Identity Verifier Backend Documentation","version":"dev"},"servers":[{"url":"{hostname}","description":"Verifier Backend REST API Server","variables":{"hostname":{"default":"https://identity.nchainplatform.com/products/web/$IDENTITY_ENV_ID/verifier/api"}}}],"paths":{"/public/siop/definitions/{definitionId}/auth-requests/{correlationId}":{"get":{"operationId":"AgentSiopAuthRequestController_definitionsAuthRequest","summary":"Initiate verification presentation from the wallet","description":"Returns JWT token which describes details about the credential being verified. It is made by wallet app to get info about the credential.","parameters":[{"name":"correlationId","required":true,"in":"path","description":"A UUID value that is bound to the VP","schema":{"format":"uuid","type":"string"}},{"name":"definitionId","required":true,"in":"path","description":"The definitionId defines the credential to ask for, eg: emailCredential.<br>The value should start with lowercase and continue using camelCase pattern.<br><b>Must be one of the allowed definitions in the template endpoint.</b>","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{}}},"400":{"description":""},"404":{"description":"Authorization not found"},"503":{"description":"The agent service is unavailable"}},"tags":["SIOP"]}}}}
```

## Finalize verification presentation from the wallet

> Endpoint is used by mobile app and it shares the credential. In payload, there is \`expires\_in\` which is the time the QR is valid.\
> The \`state\` is the unique identifier for the request. \`vp\_token\` is a JWT token that contains the \`verifiableCredential\` JWT token\
> with all the details about the credential and in the header it includes the kid that is used to reference what wallet is working with this.

```json
{"openapi":"3.0.0","info":{"title":"Identity Verifier Backend Documentation","version":"dev"},"servers":[{"url":"{hostname}","description":"Verifier Backend REST API Server","variables":{"hostname":{"default":"https://identity.nchainplatform.com/products/web/$IDENTITY_ENV_ID/verifier/api"}}}],"paths":{"/public/siop/definitions/{definitionId}/auth-responses/{correlationId}":{"post":{"operationId":"AgentSiopAuthResponseController_definitionsAuthResponse","summary":"Finalize verification presentation from the wallet","description":"Endpoint is used by mobile app and it shares the credential. In payload, there is `expires_in` which is the time the QR is valid.\nThe `state` is the unique identifier for the request. `vp_token` is a JWT token that contains the `verifiableCredential` JWT token\nwith all the details about the credential and in the header it includes the kid that is used to reference what wallet is working with this.","parameters":[{"name":"correlationId","required":true,"in":"path","description":"A UUID value that is bound to the VP","schema":{"format":"uuid","type":"string"}},{"name":"definitionId","required":true,"in":"path","description":"The definitionId defines the credential to ask for, eg: emailCredential.<br>The value should start with lowercase and continue using camelCase pattern.<br><b>Must be one of the allowed definitions in the template endpoint.</b>","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiopAuthResponseBodyDetailDto"}}}},"responses":{"200":{"description":""},"400":{"description":""},"503":{"description":"The agent service is unavailable"}},"tags":["SIOP"]}}},"components":{"schemas":{"SiopAuthResponseBodyDetailDto":{"type":"object","properties":{"expires_in":{"type":"number"},"state":{"type":"string"},"vp_token":{"type":"string"},"presentation_submission":{"type":"string"}},"required":["expires_in","state","vp_token","presentation_submission"]}}}}
```
