Unable to connect to http://sandbox.tokbox.com/

31 views
Skip to first unread message

DjayZ

unread,
Nov 23, 2010, 3:28:00 AM11/23/10
to TokBox-Developers
Help me pleaseee....

i am trying to make tokbox application for my thesist.
the concept of my thesist is make an web base video chat application.
i am using XAMPP version 1.7.3 and php version 5.3.1...
T
i have problem with registration process to tokbox. when i send
registration data to okBoxUser::registerUser($_POST['username1'],
$_POST['lastName'], $_POST['firstName']);, it give return :

Fatal error: Uncaught exception 'Exception' with message 'Unable to
connect to http://sandbox.tokbox.com/. Please check to make sure API
calls are executing properly' in C:\xampp\htdocs\ISeeUThere\SDK
\TokBoxUser.php:61 Stack trace: #0 C:\xampp\htdocs\ISeeUThere\system
\application\controllers\Anggota.php(171):
TokBoxUser::registerUser('ab...@yahoo.com', 'defgh', 'abcde') #1
[internal function]: Anggota->insertProfile() #2 C:\xampp\htdocs
\ISeeUThere\system\codeigniter\CodeIgniter.php(236):
call_user_func_array(Array, Array) #3 C:\xampp\htdocs\ISeeUThere
\index.php(115): require_once('C:\xampp\htdocs...') #4 {main} thrown
in C:\xampp\htdocs\ISeeUThere\SDK\TokBoxUser.php on line 61

so,the user on my website can't registrated..

my API config is :
class API_Config {

// Replace this value with your TokBox API Partner Key
const PARTNER_KEY = "4306 ";

// Replace this value with your TokBox API Partner Secret
const PARTNER_SECRET = "ed87ddb3fa04def3b5b0472119cd397f ";

// API Server (Test env: sandbox.tokbox.com Production env:
api.tokbox.com)
const API_SERVER = "http://sandbox.tokbox.com/";

// Callback URL for successful oauth logins
const CALLBACK_URL = "";
}

please help me to solve this problem...
i have no idea moreee.....
i also dont know how to generate embed code, how to make it work???

please reply this ASAP.thnx

Melih Onvural

unread,
Nov 23, 2010, 7:38:06 PM11/23/10
to tokbox-d...@googlegroups.com
First let's take 2 steps back, and ask a few questions.

1) What are you trying to build?

2) How do you see yourself using the Call Widget API in that regard?

Thanks.
--
Melih O.
me...@tokbox.com

> --
> You received this message because you are subscribed to the Google Groups "TokBox-Developers" group.
> To post to this group, send email to tokbox-d...@googlegroups.com.
> To unsubscribe from this group, send email to tokbox-develop...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tokbox-developers?hl=en.
>

Cahyawidi Sutanto

unread,
Nov 24, 2010, 9:53:28 PM11/24/10
to tokbox-d...@googlegroups.com
1) this is what i want to build : make my own web chatt application
that have feature to do private video chat and text chat.

i am using tokBox API to do that. then i want, when my user do
registration on my web, they also do registration to tokbox
automaticly. so when they make a video call, they can known as
registrated user to tokBox.

i am using Code igniter as my framework program, XAMPP for windows
version 1.7.3, php version 5.3.1.

i have called function TokBoxUser::registerUser($_POST['username1'],
$_POST['lastName'], $_POST['firstName']); after user registrate their
account on my website.
this is my registration code. i place this on my conntroler layer.

function insertProfile()
{
$polaemail = "^.+@.+..+$";

if($_POST['username1']==""||$_POST['password1']=="")
{
$data['info']="Invalid Email or Password. Please check your form";
$this->load->view('homeUI',$data);
}
else
{
$flag=1;
$uname=$this->Mod_Anggota->GetAllDataAnggota();
$rowuser = $uname->result();

foreach($rowuser as $row)
{
if($_POST['username1']==$row->EMAIL)
{
$data['info']= "Username was registered, use other";
$flag=0;
}
}

if($flag==1)
{
require_once 'SDK/TokBoxUser.php';

$hasil1 = $this->Mod_Anggota->InsertAnggota($_POST['username1'],
$_POST['password1'], $_POST['firstName'], $_POST['lastName'],
$_POST['nickName'], $_POST['gender'], $_POST['lokasi'],1);
$apiObj = TokBoxUser::registerUser($_POST['username1'],


$_POST['lastName'], $_POST['firstName']);

TokBoxUser::loginUser();

$tmp=$_POST['username1'];

$newdata= array(
'username'=>$tmp,
'nickname'=>$_POST['nickName']
);
$this->session->set_userdata($newdata);
redirect('/Anggota');
}
else
{
$data['incorrectlogin']="Incorrect Input,please make sure that
your input data are correct";
$data['tanda']=$flag;
$this->load->view('homeUI',$data);
}
}
}

when i tried to registrate new account, it replies error like what i
was shown to you before.

- how do i fix this and make my user registered to tokbox automatically?
- my application is working on localhost, i haven't host this yet.
must i host this first??

2) i just call function $htmlCode =
TokBoxCall::generateEmbedCode($callId, $width="800", $height="600");
as your example on video party example.

where must i put call widget function??is that must be together with other API?
i don't know yet how to use that function.

thnx Melih, sorry for my English.


--
best regrades,
Cahyawidi Sutanto.

Melih Onvural

unread,
Nov 27, 2010, 9:05:00 PM11/27/10
to tokbox-d...@googlegroups.com
I would actually suggest that you skip the user registration bit first, and work on just getting the calls to work. You really only need user registration if your users were going to use TokBox.com, and in your case they will be using your website.

That said, you'll need to figure out how to get Code Igniter to recognize the PHP SDK as a plugin. I've never tried this before, and I think that that is the problem that you're running into. Unfortunately, that's outside the scope of this developer list. Once you have the Code Igniter environment setup, the code that you have in place is exactly what you'll need to do to get video chat working on your site.

I hope that this helps.
--
Melih O.
me...@tokbox.com

Cahyawidi Sutanto

unread,
Nov 28, 2010, 5:19:16 AM11/28/10
to tokbox-d...@googlegroups.com
Ok Melih,thank you very much for your suggestion..
Reply all
Reply to author
Forward
0 new messages