Events (callback)
Events are our way of letting you know when something happens in one of our services.
MobileID events are a type of Signicat event that are specific to the Mobile service. For example, a MobileID event is generated when an authentication result is ready.
This page focuses on MobileID events. For general information about Signicat events and the events service, see our Events and webhooks documentation.
How do MobileID events work?
When an asynchronous operation completes, or when MobileID gets a notification that a device has changed state, MobileID publishes an event with the operation result.
If you have subscribed to the event, then you automatically receive the result at your specified notification URI. This is often referred to as callback.
You can also get the operation result back through polling. The result that you receive through the Signicat events service is the same as the result obtained by polling, but wrapped in a Signicat event object.
When to use callback
We recommend that you always set up callback for production. This offers the best usability and responsiveness as it has the least amount of latency, and means that you do not need to conduct additional polling calls.
When to use polling
Regardless of whether callback is set up or not, you can fetch the result of a completed operation from Signicat by polling.
You can do this by running GET API calls, but it should only be reserved for testing and development use.
Which events does MobileID publish?
For an overview of the events that you can subscribe to, see the table below:
What do MobileID events look like?
Events follow the same structure across all Signicat services, with the exception of the event data (eventData) field. This field varies depending on the type of event, as it is where we pass the operation result as a JSON object.
You can find an overview of a MobileID event in the table below:
How to subscribe to MobileID events
You can use the Signicat Dashboard to subscribe to the events that you would like to receive callback for. To do this:
- Go to Signicat Dashboard > Settings > Events.
- Click the +Add subscription button.
- Select a subscription type, for example Webhook.
- Complete the required fields. In the Listen to section, under MobileID, select the events that you want to subscribe to.
- Click the Add button.
To learn more about subscribing to and managing events, see the Events and webhooks page in the Signicat Dashboard documentation.
How to preview MobileID events
You can preview what the JSON payload looks like for each event in the Signicat Dashboard when you set up a new subscription. To do this:
- Go to Signicat Dashboard > Settings > Events.
- Click the +Add subscription button.
- Select a subscription type, for example Webhook.
- Under the Listen to section, click Selected events, then expand the MobileID dropdown menu.
- Hover over the event that you want to preview, then click the Preview button that appears to the right of the event name.
- An example of the event appears to the right-hand side of the screen. You can use the Example toggle button at the top of the example to toggle between the operation result and the entire Signicat event object.
To learn what the different properties mean in the examples, see the respective response schema in the MobileID API reference documentation.