---
# System prepended metadata

title: Init-Protocol-Request

---

- Name: Init-Protocol-Request
- Authors: Douglas Wightman <douglas.wightman@evernym.com>
- Start Date: 2019-06-18

# Init-Protocol-Request
[summary]: #summary

A single message protocol where one party can request another party initiate a standard protocol. For example, Alice can send an Init-Protocol-Request to Bob asking that bob send a proof request.

# Motivation
[summary]: #motivation

Protocols are initialized by one party. Faber sends a proof request to Alice. Faber sends a credential offer to Bob. There are instances, however, where Alice needs Faber to send a proof request. Alice needs to get Faber's attention. The "Init-Protocol-Request" protocol allows Alice to "knock" on Faber's door and request that Faber initiate a specific protocol using an existing connection.

In the use case where Alice wants to login to Faber's website by simply scanning a QR code the QR code should be static and generic (so the page can render quickly and also not contain any PII). We believe this QR code can't contain a proof request because the nonce must be unique and the page would probably be too expensive to render. Our thinking is that this QR code should instead contain instructions on how to "initiate a protocol request", or in other words, how to "knock on the door". 

# Tutorial
[summary]: #tutorial

In this example we'll look at Faber using credentials to authenticate web-portal users. Faber will display information on the portal telling anyone who wishes to login to send an Init-Protocol-Request to the pairwise connection 

### Interaction

The protocol begins and ends when Alice sends a `init-protocol-request` message to Faber. In this example Alice requests that Faber initialize a "questionanswer" protocol:

```JSON
{
  "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/init-protocol-request/1.0/request",
  "@id": "518be002-de8e-456e-b3d5-8fe472477a86",
  "requested_protocol": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/questionanswer/1.0/question",
  "protocol_data":"<optional_protocol_specific_data>"
  "~service": {
        "recipientKeys": ["8HH5gYEeNc3z7PYXmd54d4x6qAfCNrqQqEB3nS7Zfu7K"],
        "routingKeys": ["8HH5gYEeNc3z7PYXmd54d4x6qAfCNrqQqEB3nS7Zfu7K"]
        "serviceEndpoint": "https://example.com/endpoint"
   }
}
```

With this message, Alice is requesting that Faber initiate a "questionanswer" protocol.

### Optional Elements

The "~service" element is optional. In cases where a connection already exists between Alice and Faber the ~service decorator is not needed (indeed that connection is already in use when sending the init-protocol-request message). In cases where a connection does not already exist the "~service" decorator should be used for the responding protocol.

The "protocol_data" is also optional
