Generate Cid from username

d4ne
by d4ne · 33 posts
8 years ago in PHP
Posted 2 years ago
How reliable is using a Cid. Will it always work? And has there ever been any errors when you used a Cid?
Posted 2 years ago
@Eldrago9


im not sure what u mean by this question, but i hope this answer helps.

a lot of IMVU's endpoints related to avatars require you to supply a CID instead of a username. so if you know how to find the CID from a username, as long as you're doing the web request correctly you shouldn't have any errors with it. for example, if you have ever seen the URL for the block button on someones homepage, the URL contains their CID instead of their username, if you replaced the CID with a username I bet it wouldn't work.
Posted 2 years ago
@Eldrago9


Database records when properly normalized in a relational database by a DBA have an ID column on each table, which acts as a unique primary key. The primary key for IMVU's customer user table is called the CID, which stands for Customer Identification Number. The CID is an incremented integer, unique to each user and required by the database. A new customer record is not created in IMVU's database at registration without also generating a new CID, which is equal to the previously largest CID + 1. The sanity and health of the database relies on this number to quickly and efficiently lookup information on a customer, not only within the customers table, but also within related tables that reference the CID as a foreign key to join on. These lookups can be called by users, simply by feeding the appropriate parameters, often using the CID as one said parameter, to an API (application programming interface) URL (Uniform Resource Locator). For example, the API's leveraged by the IMVU Mafias bio generate to mine user data from IMVU's database.

Errors can and do occur when calling an API if:
1) Authentication is required and you are not authenticated (not logged in)
2) Your authentication is missing required privileges, such as trying to access AP data without AP, or trying to access the private messages of an account you are not logged into
3) Missing required parameters
4) Malformed agent data
5) Incorrect protocols

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT