type: collect

Receive a daily user reward.

URL:

https://swayfy.xyz/api/economy

Required headers:

{
auth: '',
encrypt: '',
type: '',
userid: '',
}
  • auth - API Key.

  • encrypt - Encryption Key.

  • type - Request type (In this case, it should be set to collect).

  • userid - Discord user ID (example: 823254853295669268).

Example headers:

{
auth: '',
encrypt: '',
type: 'collect',
userid: '823254853295669268',
}

Output (flawless):

{
bal: number,
value: number,
err: boolean,
}
  • bal - Current user balance.

  • value - The amount of the currency received (added) to the balance of the user.

  • err - If true, an invalid request is sent; if false, everything succeeds.

Output (errored):

{
remaining: number, 
err: boolean
}
  • remaining - Time (ms) left until next daily reward.

  • err - If true, an invalid request is sent; if false, everything succeeds.

Example outputs:

{
bal: 11,
value: 200,
err: false
}
{
remaining: 76544,
err: true
}

Last updated