To add Microsoft account in Mailivery follow this steps

To Add Outlook / Office accounts in Mailivery Generate a Secure embeddable url and iframe it in Your application. Users will fill in basic details and complete the OAuth Login Flow.

1. Generate Secure embeddable URL

You can add extra query parameters to url while generating Secure embeddable URL. This data will be sent to you after flow completion in form of meta query string in return URL.

curl --request GET \
     --url https://app.mailivery.io/api/v1/embed/form/secure \
     --header 'accept: json' \
     --header 'authorization: Bearer <<token>>'
GET /api/v1/embed/form/secure HTTP/1.1
Accept: json
Authorization: Bearer <<token>>
Host: app.mailivery.io
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.mailivery.io/api/v1/embed/form/secure', [
  'headers' => [
    'accept' => 'json',
    'authorization' => 'Bearer <<token>>',
  ],
]);

echo $response->getBody();
const fetch = require('node-fetch');

const url = 'https://app.mailivery.io/api/v1/embed/form/secure';
const options = {method: 'GET', headers: {accept: 'json', authorization: 'Bearer <<token>>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));

⚠️

Embeddable URL in unique and expirable.

Please remeber that embeddable URL is only valid for 10 Minutes and will throw 404 Error after Expiry.

{
    "data": {
        "url": "http://mailivery.test/embed/form?expires=1707257884&identifier=eyJpdiI6Ijk4RXRIOHJxZ3VyTkh3dWxUNnh4VXc9PSIsInZhbHVlIjoiNUUwTFdnRU14ZkFBaFdCcjVuQjZ4L0NZYlVzMXErV1dMUnhGd2FLTTlLWHZlc1psdkMxeXN3ZnRYWU9lTDhCZzN3a1RrOWl5RWM2cGs3djRiZEZLaEE9PSIsIm1hYyI6IjhiMWE0OGU2M2VhZjg2OTI4M2ExNGQyZTc4MzBjYmRmYjU0ZTFmMDkwYzFkMTVkYTE2Nzc3ZTc4YmViMGQzNmYiLCJ0YWciOiIifQ%3D%3D&meta=woodpecker_context%3Dd3asf35dase45g323%26email%3Dmarcin.madejski%40outlook.com&signature=552b2c4f08863f901380a9ba9fb9feb957e21fec2f89747a61abd5ae8c39a1f8"
    },
    "success": true,
    "status": 200,
    "code": "EMBED_FORM_URL_FETCHED",
    "message": "Embed form url fetched successfully"
}

In above example You can see woodpecker_context and email was passed as paramerter and it returned in Meta query string of signed URL.


2. Get data after Successful Authentication

After user has successfully added Micorsoft account User will be redirected to URL which you have already submitted in embed form settings.