Jump to content

What is a Token ?


cgishack

Recommended Posts

 

I am trying to connect to a Web Service using SOAP.

 

Right now I connect using the code below....

 

$client = new SoapClient( $wsdlUrl ); 

 

But the first thing I must do is call a method called Connect_v1. But it takes a TOKEN ?

So it should look like so....

$client->Connect_v1( $token );

 

But what is a token ?

How can I create a Token ?

I did the same program in ASP.NET C# and the token was like so. (but it was something I found online)

byte[] token = new byte[1];

 

Can someone help me make a token in php ?

Thanks

Drew

Link to comment
https://forums.phpfreaks.com/topic/47629-what-is-a-token/
Share on other sites

Below is the error I am getting

 

PHP Fatal error: Uncaught SoapFault exception: [soap:Server] Server was unable to process request. --> Object reference not set to an instance of an object. in C:\ArcIMS\Website\PhpPicto\test.php:27 Stack trace: #0 [internal function]: SoapClient->__call('Connect_v1', Array) #1 C:\ArcIMS\Website\PhpPicto\test.php(27): SoapClient->Connect_v1(Array) #2 {main} thrown in C:\ArcIMS\Website\PhpPicto\test.php on line 27

Link to comment
https://forums.phpfreaks.com/topic/47629-what-is-a-token/#findComment-232650
Share on other sites

A token...isn't that a black child on South Park?

 

Anyhow a Token is generally a encrypted string that houses important data to login to a system remotely. Generally used for API/web services. They pass tokens back and forth so you know that the person is valid.

 

So lets say I am accessing site 2 from site 1. In order for site 2 to know I am a valid user a token must have been created and sent to site 1 to use for each of it's call to site 1. The tokens usually expire in 20 minutes or so for security reasons, but are generally never seen from the public.

 

In order to retrieve a valid token you must have access to the API/Web service which may require a KEY of some type that you enter in as your HOST KEY or something that needs to be passed to the site so it knows that your site can indeed receive and dish out tokens for users using your website.

 

Fun stuff anyhow. I would look at the FAQ or contact the image warehouse and ask them about the token.

Link to comment
https://forums.phpfreaks.com/topic/47629-what-is-a-token/#findComment-232652
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.