POST
/
#getUserInfoByIdentity

Understanding getUserInfoByIdentity

  • getUserInfoByIdentity 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:

    • provider - string, identity provider, now only support jwt.

    • UID - string, user identifier.

Authorization use project server key

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: "getUserInfoByIdentity",
      params: ["jwt", "User Identity ID"],
    },
    {
      auth: {
        username: "Your Project Id",
        password: "Your Project Server Key",
      },
    }
  );

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

Authorizations

Authorization
string
headerrequired

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

Body

application/json
jsonrpc
string
default: 2.0

Version of the JSON-RPC protocol, should be 2.0.

id
integer
default: 1

The request identifier.

method
string
default: getUserInfoByIdentity

API method being called, should be getUserInfoByIdentity.

params
string[]

Parameters for the API method call, including the identity provider and user identifier.

Response

200 - application/json
jsonrpc
string
id
integer
result
object