Create MFA Pairing Key
POST {{apiPath}}/environments/{{envID}}/users/{{userID}}/pairingKeys
The POST /environments/{{envID}}/users/{{userID}}/pairingKeys
operation adds a pairing key to the specified user resource.
Use the applications
to provide a list of native application IDs that can be used with this pairing key. Leave applications
as an empty collection to allow all available native applications in the environment to be used.
Note: If you create a pairing key that is shared by multiple applications, but have defined different pairing key lifetimes for the different applications, all the applications using the pairing key will use the most strict setting that you specified for key lifetime (shortest time).
Only native applications that have bundleId
or packageName
, and are associated with pushCredentials
are considered available in this context. Such applications should represent native applications that exist in the Apple or Google applications store.
Prerequisites
- See PingOne MFA and MFA Pairing Keys for important overview information.
See the Pairing key data model for full property descriptions.
Property | Type | Required? |
---|---|---|
applications | String[] | Optional |
policy.id | String | Optional |
Request Body
{"applications"=>[{"id"=>"{{appID}}"}], "policy"=>{"id"=>"{{deviceAuthenticationPolicyID}}"}}
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/788d4931-6936-43f2-82ff-178f5762298a/pairingKeys/8b22c502-a607-4b3c-8dad-d9ef2397f19a"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/788d4931-6936-43f2-82ff-178f5762298a"}},"id":"8b22c502-a607-4b3c-8dad-d9ef2397f19a","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"code":"01882778807215","status":"UNCLAIMED","applications":[{"id":"7d8797b7-a097-46a9-841f-88f531d1d99b"}],"user":{"id":"788d4931-6936-43f2-82ff-178f5762298a"},"createdAt":"2022-02-02T16:33:55.722Z","updatedAt":"2022-02-02T16:33:55.722Z","expiresAt":"2022-02-04T16:33:55.722Z"}