Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

51 lines (40 sloc) 1.18 KB
<?php
/**
* Created by PhpStorm.
* Desc: Loop lookup mixin user id as uuid format.
* User: robin
* Date: 2019-05-17
* Time: 15:39:27
*/
// Mixin-SDK-PHP: https://github.com/ExinOne/mixin-sdk-php
// Requirement: Composer and PHP >= 7.0
// Installation: composer require exinone/mixin-sdk-php -vvv
require __DIR__ . '/vendor/autoload.php';
use ExinOne\MixinSDK\MixinSDK;
// Replace the config info with your Mixin bot
$config = [
'mixin_id' => '',
'client_id' => '',
'client_secret' => '',
'pin' => '',
'pin_token' => '',
'session_id' => '',
'private_key' => <<<EOF
EOF
,
];
$mixinSdk = new \ExinOne\MixinSDK\MixinSDK();
$mixinSdk->setConfig('myConfig',$config);
// Replace xxx with the Mixin ID of your team member
$usersArray = ["xxx",
"xxx",
"xxx",
"xxx",
"xxx"];
// Loop lookup mixin user id as uuid format
// Copy this uuid to Operators in config.go
foreach ($usersArray as $user) {
$users = $mixinSdk->use('myConfig')->network()->searchUser($user);
echo $users['user_id'] . "\n";
}
?>
You can’t perform that action at this time.