User Profile API

GET Profile data

This endpoint is used to retrieve user profile details. It requires a valid access token in the authorization header to retrieve the profile.

HTTP Request

GET https://api.stagemeta.dev/auth/profile

Headers

{
  "id": 22,
  "createdAt": "2022-09-20T12:21:48.995Z",
  "updatedAt": "2023-04-18T16:09:29.327Z",
  "deletedAt": null,
  "email": "email@gmail.com",
  "username": "my-username",
  "image": "https://cdn.stagetry.dev/images/a6bbff20-3.....",
  "walletAddress": "0xf5ad068.....cc05c44c91",
  "receiveEmail": true,
  "canGetDeltaEnergy": false,
  "emailVerify": true,
  "emailVerificationCodeExpireTime": "2023-04-14T11:24:16.008Z",
  "access": [],
  "stripeCustomerId": "cus_...51V4..YyH",
  "totalEnergyReceived": 0,
  "totalPings": 0,
  "isStageWallet": false
}

Example Request

curl -X 'GET' \
  'https://api.stagemeta.dev/auth/profile' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <access_token>'

Post Profile data

This endpoint allows users to update their profile information.

HTTP Post Request

POST https://api.stagemeta.dev/auth/profile

Headers

Request Body

{
  "user": {
    "id": 22,
    "createdAt": "2022-09-20T12:21:48.995Z",
    "updatedAt": "2023-04-18T16:09:29.327Z",
    "deletedAt": null,
    "email": "...@gmail.com",
    "username": "...",
    "image": "https://cdn.stagetry.dev/images/....png",
    "walletAddress": "0xf5ad068d....f37965cc05c44c91",
    "receiveEmail": true,
    "canGetDeltaEnergy": false,
    "emailVerify": true,
    "emailVerificationCodeExpireTime": "2023-04-14T11:24:16.008Z",
    "access": [],
    "stripeCustomerId": "cus_ND...V4cmYyH",
    "totalEnergyReceived": 0,
    "totalPings": 0,
    "isStageWallet": false
  },
  "token": "user-token"
}

Example Requests

curl -X 'POST' \
  'https://api.stagemeta.dev/auth/profile' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Content-Type: multipart/form-data' \
  -F 'username=newName' \
  -F 'password=password' \
  -F 'phoneNumber=1234567890' \
  -F 'image=base64 encoded image'

Last updated