Crossbell Profile

Crossbell

TIP

You can use Crossbell API for free (no rate limit disclosed).

Crossbellopen in new window.

You can initialize with ipfsGateway to potentially get a faster response or higher stability.

API

Get

const profiles: Profiles = await unidata.profiles.get(options: {
    source: 'Crossbell Profile';
    identity: string;
    platform?: 'Ethereum' | 'Crossbell';
    limit?: number;
    cursor?: string;
    filter?: {
        primary?: boolean;
    }
});
  • Use Ethereum address as the identity and 'Ethereum' as the platform to get all profiles belonging to this address.
  • Use Crossbell handle as the identity and 'Crossbell' as the platform to get a specific profile.

Set

const result: {
    code: number;
    message: string;
} = await unidata.profiles.set(
    options: {
        source: 'Crossbell Profile';
        identity: string;
        platform?: 'Ethereum' | 'Crossbell';
        action?: 'update' | 'add';
    },
    input: {
        username?: string;
        name?: string;
        avatars?: URI[];
        bio?: string;
        websites?: URI[];
        banners?: {
            address: URI;
            mime_type: string;
        }[];
        connected_accounts?: {
            identity: string;
            platform: string;
            url?: string;
        }[];
    },
    extra?: {
        newbieToken?: string;
    },
);
  • Use Ethereum address as the identity and 'Ethereum' as the platform to set primary profile of this address.
  • Use Crossbell handle as the identity and 'Crossbell' as the platform to set a specific profile.
  • action: can be update or add, default to update.
  • If the platform is Crossbell, then the action cannot be add.
  • newbieToken: token for Crossbell newbie.

Live Demo

Get

42 / 42
Code
const profiles: Profiles = await unidata.profiles.get({
    source: 'Crossbell Profile',
    identity: '0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944',
    platform: 'Ethereum',
});
View
Data
{
    "total": 0,
    "list": []
}

Set

Open the browser console and execute the following code

update action:

await unidata.profiles.set(
    {
        source: 'Crossbell Profile',
        identity: '<your_ethereum_address>',
        platform: 'Ethereum',
        action: 'update',
    },
    {
        name: '<your_name>',
    },
);

add action:

await unidata.profiles.set(
    {
        source: 'Crossbell Profile',
        identity: '<your_ethereum_address>',
        platform: 'Ethereum',
        action: 'add',
    },
    {
        username: '<crossbell_handle>',
        name: '<your_name>',
    },
);