PDA

View Full Version : How to generate the token and secret?


movcel
09-13-2016, 09:50 AM
I need to insert manually into the database a user vbulletin but I need to know how to generate the information that goes on the field and secret token user table of the database.

Note: I need please function or where the file generated is my token and secret

noypiscripter
09-13-2016, 02:58 PM
Why not use the user API to add a new user? That will take care of generating the token and secret, you just pass the required user info.

movcel
09-13-2016, 03:49 PM
hello, it happens is that I'm developing a separate module to register users on my own in the vbulletin, and I need to know which way the vbulletin 5 generates the token and secret of users.

How I can implement the api to add users from my other website vbulletin¡

noypiscripter
09-13-2016, 08:34 PM
Is that module in the same forum or is it in a different website?

movcel
09-14-2016, 09:36 AM
Searching the web I found that by vbulletin API using the following url can be registered users.

The problem that arises is that not where the parameter is achieved:
api_c, api_s, api_sig, api_v.

http://www.yourforumurl.com/api.php?api_m=forum_markread&api_c=clientid&api_s=accesstoken&api_sig=signature&api_v=1&b=value1&a=value2

From the example, you'll see:
api.php specific params are prefixed with 'api_'
api_m = method name
api_c = ClientID.
api_s = Access token.
api_sig = signature of the request
api_v = the api version called by the request
b = value1 & a = value2 are the HTTP GET params accepted by the method (forum_markread) of the API

It is a different vbulletin website, what you want is that when they sign on my external to vbulletin system at the same time to implement a function to register with the same user data in the forum of vbulletin, but for that you need to know as the token and secret field of user table is generated

noypiscripter
09-14-2016, 06:34 PM
Does the external website use PHP and reside in the same server as vBulletin? If so, you could call the API directly without having to send an HTTP request. That would be faster in terms of performance as there is no HTTP request overhead.

movcel
09-14-2016, 09:11 PM
correct the site is on the same server but as I use the api ?.
I was watching that can be used for http, but I need the idClient, Access token, signature of the request and do not know where to get that in vbulletin You could give me a help