Message Signing

Sign Message

Sign a message using the Okto Gateway. Check out the Sign Message API template script for more details.

POST
/api/oc/v1/signMessage

Authorization

AuthorizationRequiredBearer <token>

In: header

Request Body

application/jsonRequired
dataRequiredobject
curl -X POST "https://sandbox-api.okto.tech/api/oc/v1/signMessage" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "userData": {
        "userSWA": "0xd917DFbdA2Bd9EF9628DA4E55150f6559aF5b6ac",
        "jobId": "e3b58883-15ce-4bdc-8e88-7f293c7f2a20",
        "sessionPk": "0x04bbe2beca75a23b65a16c7b945d39ed11d1083bc5689550272be624042a4ca7d06a27640950812cb761518edda629df674518d5acb7e226ab1c1f1fa6d137b909"
      },
      "transactions": [
        {
          "transactionId": "b5ad84c9-0bb1-4cd8-ad17-4c8eca48ef2d",
          "method": "EIP191",
          "signingMessage": "hello okto",
          "userSessionSignature": "0xffac7e7e461a7a968c7d59b3489a7bb300b59e333218ca37d97aff73de548636549edc33e97affd989c911620078a919c8f01c0fc95e9f719aaf75141c3456e41c"
        }
      ]
    }
  }'

Fetched

{
  "status": "success",
  "data": {
    "signature": "0x83c701514dd434454495f514bf560904b76dec9f476cf847a2aa782546aead3b024e1f3fe69d47529384bae2d3f206d74777943f08b84dd3612dbcdd731c99f41c"
  }
}