POST
/
#getUserInfo
curl --request POST \
  --url 'https://api.particle.network/server/rpc/#getUserInfo' \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getUserInfo",
  "params": [
    "UUID",
    "Token"
  ]
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "uuid": "2d7b1ff2-0791-4fd2-a26e-16fbcaefdf8a",
    "phone": null,
    "email": "U1gphy1mnU@particle.network",
    "name": null,
    "avatar": null,
    "facebookId": null,
    "facebookEmail": null,
    "googleId": null,
    "googleEmail": null,
    "appleId": null,
    "appleEmail": null,
    "twitterId": null,
    "twitterEmail": null,
    "telegramId": null,
    "telegramPhone": null,
    "discordId": null,
    "discordEmail": null,
    "githubId": null,
    "githubEmail": null,
    "twitchId": null,
    "twitchEmail": null,
    "microsoftId": null,
    "microsoftEmail": null,
    "linkedinId": null,
    "linkedinEmail": null,
    "createdAt": "2022-06-08T07:47:54.000Z",
    "updatedAt": "2022-06-08T07:47:55.000Z",
    "wallets": [
      {
        "chain": "evm_chain",
        "publicAddress": "0x6D5fCEd0C74F22a1B145ef48B25527Ce9BF829bF"
      }
    ]
  }
}

Understanding getUserInfo

  • getUserInfo retrieves a JSON object containing various data points relating to a registered user (a user that has already undergone social login), such as their name, UUID, token, email, and so on. The population of specific data points (such as facebookId, googleId, etc.) will be dependent upon their primary associated social account.` It takes:

    • UUID - string.

    • Token - string.


Query example

JavaScript
const axios = require("axios");

(async () => {
  const response = await axios.post(
    "https://api.particle.network/server/rpc",
    {
      jsonrpc: "2.0",
      id: 0,
      method: "getUserInfo",
      params: ["Particle Auth User Uuid", "Particle Auth User Token"],
    },
    {
      auth: {
        username: "Your Project Id",
        password: "Your Project Server Key",
      },
    }
  );

  console.log(response.data);
})();

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
Request parameters for retrieving user information.

The body is of type object.

Response

200 - application/json
Successful response with user information.

The response is of type object.