Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.73 KB

File metadata and controls

68 lines (44 loc) · 1.73 KB

MailMojo\EmbedApi

All URIs are relative to http://api.mailmojo.no, except if the operation defines another base path.

Method HTTP request Description
createEmbedSession() POST /v1/embed/ Create a new embedded application session.

createEmbedSession()

createEmbedSession($embed): string

Create a new embedded application session.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: mailmojo_auth
$config = MailMojo\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new MailMojo\Api\EmbedApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$embed = new \MailMojo\Model\Embed(); // \MailMojo\Model\Embed

try {
    $result = $apiInstance->createEmbedSession($embed);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmbedApi->createEmbedSession: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
embed \MailMojo\Model\Embed

Return type

string

Authorization

mailmojo_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]