Skip to content
Download Beeper

Submit login step

$client->bridges->loginSessions->steps->submit(string stepID, string bridgeID, string loginSessionID, Type type, ?array<string,string> fields, ?string lastURL, ?Source source): LoginSession
POST/v1/bridges/{bridgeID}/login-sessions/{loginSessionID}/steps/{stepID}

Submit input for the current step of a bridge login session.

ParametersExpand Collapse
bridgeID: string

Bridge ID.

loginSessionID: string

Temporary bridge login session ID.

stepID: string

Current bridge login session step ID.

type: Type
fields?:optional array<string,string>

Field values keyed by the field IDs from the current step.

lastURL?:optional string

Last browser URL reached during a cookies step, if available.

source?:optional Source

How the step was completed. Omit unless the client needs to distinguish an embedded webview or browser extension.

ReturnsExpand Collapse
string bridgeID

Bridge ID.

string loginSessionID

Temporary bridge login session ID.

Status status
?Account account

A chat account added to Beeper.

?string accountID

Chat account ID for reconnect flows, when known.

?CurrentStep currentStep

Step the client should show or complete next. Omitted when the session is complete, cancelled, or failed.

?APIError error

Signed-in identity for a bridge. One bridge login can contain multiple chat accounts.

?string loginID

Bridge login ID for reconnect flows, when known.

Submit login step

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(accessToken: 'My Access Token');

$loginSession = $client->bridges->loginSessions->steps->submit(
  'x',
  bridgeID: 'local-whatsapp',
  loginSessionID: '123',
  type: 'user_input',
  fields: ['foo' => 'string'],
  lastURL: 'lastURL',
  source: 'api',
);

var_dump($loginSession);
{
  "bridgeID": "bridgeID",
  "loginSessionID": "loginSessionID",
  "status": "waiting_for_input",
  "account": {
    "accountID": "accountID",
    "bridge": {
      "id": "id",
      "provider": "cloud",
      "type": "type"
    },
    "status": "connected",
    "user": {
      "id": "id",
      "cannotMessage": true,
      "email": "email",
      "fullName": "fullName",
      "imgURL": "imgURL",
      "isSelf": true,
      "phoneNumber": "phoneNumber",
      "username": "username"
    },
    "capabilities": {
      "foo": "bar"
    },
    "loginID": "loginID",
    "network": "network",
    "statusText": "statusText"
  },
  "accountID": "accountID",
  "currentStep": {
    "fields": [
      {
        "id": "id",
        "initialValue": "initialValue",
        "label": "label",
        "optional": true,
        "placeholder": "placeholder",
        "type": "type"
      }
    ],
    "stepID": "stepID",
    "type": "user_input",
    "attachments": [
      {}
    ],
    "instructions": "instructions"
  },
  "error": {
    "code": "code",
    "message": "message",
    "details": {
      "foo": "bar"
    }
  },
  "login": {
    "bridgeID": "bridgeID",
    "loginID": "loginID",
    "removeScopes": [
      "current-device"
    ],
    "status": "connected",
    "accountIDs": [
      "string"
    ],
    "statusText": "statusText",
    "user": {
      "id": "id",
      "cannotMessage": true,
      "email": "email",
      "fullName": "fullName",
      "imgURL": "imgURL",
      "isSelf": true,
      "phoneNumber": "phoneNumber",
      "username": "username"
    }
  },
  "loginID": "loginID"
}
Returns Examples
{
  "bridgeID": "bridgeID",
  "loginSessionID": "loginSessionID",
  "status": "waiting_for_input",
  "account": {
    "accountID": "accountID",
    "bridge": {
      "id": "id",
      "provider": "cloud",
      "type": "type"
    },
    "status": "connected",
    "user": {
      "id": "id",
      "cannotMessage": true,
      "email": "email",
      "fullName": "fullName",
      "imgURL": "imgURL",
      "isSelf": true,
      "phoneNumber": "phoneNumber",
      "username": "username"
    },
    "capabilities": {
      "foo": "bar"
    },
    "loginID": "loginID",
    "network": "network",
    "statusText": "statusText"
  },
  "accountID": "accountID",
  "currentStep": {
    "fields": [
      {
        "id": "id",
        "initialValue": "initialValue",
        "label": "label",
        "optional": true,
        "placeholder": "placeholder",
        "type": "type"
      }
    ],
    "stepID": "stepID",
    "type": "user_input",
    "attachments": [
      {}
    ],
    "instructions": "instructions"
  },
  "error": {
    "code": "code",
    "message": "message",
    "details": {
      "foo": "bar"
    }
  },
  "login": {
    "bridgeID": "bridgeID",
    "loginID": "loginID",
    "removeScopes": [
      "current-device"
    ],
    "status": "connected",
    "accountIDs": [
      "string"
    ],
    "statusText": "statusText",
    "user": {
      "id": "id",
      "cannotMessage": true,
      "email": "email",
      "fullName": "fullName",
      "imgURL": "imgURL",
      "isSelf": true,
      "phoneNumber": "phoneNumber",
      "username": "username"
    }
  },
  "loginID": "loginID"
}