Skip to content

Instantly share code, notes, and snippets.

@Darkflib
Created July 12, 2015 10:36
Show Gist options
  • Save Darkflib/2d6f9473e2bc8df0f945 to your computer and use it in GitHub Desktop.
Save Darkflib/2d6f9473e2bc8df0f945 to your computer and use it in GitHub Desktop.
Slack signup
<?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