List your users
The first step get access to the data is to list the users currently in your program.
You can do this by calling the oauth2-listusers web service, which will return a list of users connected to your application.
{
"status": 0,
"body": {
"users": [
{
"userid": 32862042,
"hash_userid": "2f06229ccbc4e99e7bc42f082b32edb120c8ddf936533a9da92b1441bd61e0e2",
"email": "john.doe@example.com",
"fully_owned": true
},
{
"userid": 33721047,
"hash_userid": "a7cb5f9113b9502f157e0a2a1fde0692f69ca6bc83f17210cafc3d3a0ad539a5",
"email": "maria.jones@example.com",
"fully_owned": false
}]
}
}
Retrieve user's tokens
Once you have listed the users and retrieved the userid for each, the next step is to call the oauth2.recoverauthorizationcode web service. This service will provide the authorization code required to fetch OAuth2 tokens for the user. (In the following section, we’ll explain how to exchange the authorization code for tokens.)
Regular User Import Check
We recommend checking for new users every day or twice a day to ensure that no users are missed.
You can compare users by userid to avoid importing the same user more than once (ensure uniqueness based on userid).
Note: This process will be streamlined in the future with a filtering system, allowing you to retrieve only the users added after a specific date.