After an initial Connect event has taken place, an app may disconnect from Phantom at anytime. Once disconnected, Phantom will reject all signature requests until another connection is established.

Base URL

https://phantom.app/ul/v1/disconnect

Query string parameters

  • dapp_encryption_public_key (required): The original encryption public key used from the app side for an existing Connect session.

  • nonce (required): A nonce used for encrypting the request, encoded in base58.

  • redirect_link (required): The URI where Phantom should redirect the user upon completion. For more details, see Specify redirects. URL-encoded.

  • payload (required): An encrypted JSON string with the following fields:

    {
        "session": "...", // token received from the connect method
    }
    
    • session (required): The session token received from the Connect method. For more details, see Handle sessions.

Returns

Approve

No query params returned.

Reject

An errorCode and errorMessage as query parameters. For a full list of possible error codes, see Errors.

{
  "errorCode": "...",
  "errorMessage": "..."
}

Example

Refer to the disconnect method implemented in our React Native demo application.