POST
/
api
/
v1
/
ephemeral-token
Generate a new ephemeral token
const url = 'https://api-pse.gnosispay.com/api/v1/ephemeral-token';
const options = {method: 'POST', body: undefined};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "data": {
    "token": "8356ea2b8e7f1d49c2e5f8a76b91c02a3d4f7e10a2c5b9d8e1f4a7c0b3d5e2f",
    "expiresAt": "2024-02-07T12:34:56Z"
  }
}

Response

200
application/json

Ephemeral token generated successfully

The response is of type object.