Skip to content

Instantly share code, notes, and snippets.

@sanket2385
Forked from Darkflib/slack signup
Last active August 29, 2015 14:24
Show Gist options
  • Save sanket2385/60e80fe5301f64fb4b7d to your computer and use it in GitHub Desktop.
Save sanket2385/60e80fe5301f64fb4b7d to your computer and use it in GitHub Desktop.
<?php
//requires guzzle
require_once '../vendor/autoload.php';
$token='xoxp-3180528888-111111-98229-b4e1b7';
$email='darkflib@example.com';
$teamname='example';
$url="https://${teamname}.slack.com/api/users.admin.invite";
echo $url;
$client = new GuzzleHttp\Client();
$res = $client->post($url, [
'form_params' => [
'email' => $email,
'token' => $token
]
]);
echo $res->getStatusCode();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment