Generate connection session tokens or auth URLs to allow your customers to connect their accounts.
- createConnectSession - Create Connect Session
- authenticateConnectSession - Authenticate Connect Session
Create Connect Session
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Components\ConnectSessionCreate(
categories: [
Components\Categories::Ats,
Components\Categories::Hris,
Components\Categories::Ticketing,
Components\Categories::Crm,
Components\Categories::Iam,
Components\Categories::Marketing,
Components\Categories::Lms,
Components\Categories::Iam,
Components\Categories::Documents,
Components\Categories::Ticketing,
Components\Categories::Screening,
Components\Categories::Messaging,
Components\Categories::Accounting,
Components\Categories::Scheduling,
],
originOwnerId: '<id>',
originOwnerName: '<value>',
);
$response = $sdk->connectSessions->createConnectSession(
request: $request
);
if ($response->connectSessionTokenAuthLink !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Components\ConnectSessionCreate | ✔️ | The request object to use for the request. |
?Operations\StackoneCreateConnectSessionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Authenticate Connect Session
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Components\ConnectSessionAuthenticate(
token: '<value>',
);
$response = $sdk->connectSessions->authenticateConnectSession(
request: $request
);
if ($response->connectSession !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Components\ConnectSessionAuthenticate | ✔️ | The request object to use for the request. |
?Operations\StackoneAuthenticateConnectSessionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |