Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 2.93 KB

README.md

File metadata and controls

66 lines (47 loc) · 2.93 KB

EmbedTokens

(embedTokens)

Overview

Available Operations

  • create - Create a new embed token

create

Create a new embed token for the referral link.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Dub;
use Dub\Models\Operations;

$sdk = Dub\Dub::builder()
    ->setSecurity(
        'DUB_API_KEY'
    )
    ->build();

$request = new Operations\CreateEmbedTokenRequestBody(
    linkId: '<id>',
);

$response = $sdk->embedTokens->create(
    request: $request
);

if ($response->object !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\CreateEmbedTokenRequestBody ✔️ The request object to use for the request.

Response

?Operations\CreateEmbedTokenResponse

Errors

Error Type Status Code Content Type
Errors\BadRequest 400 application/json
Errors\Unauthorized 401 application/json
Errors\Forbidden 403 application/json
Errors\NotFound 404 application/json
Errors\Conflict 409 application/json
Errors\InviteExpired 410 application/json
Errors\UnprocessableEntity 422 application/json
Errors\RateLimitExceeded 429 application/json
Errors\InternalServerError 500 application/json
Errors\SDKException 4XX, 5XX */*