View Full Version : API login_login error: badlogin
gigagon
20 Apr 2012, 15:41
Hi Community,
I have wrote a simple api-login-script but every time I get the error message: badlogin.
I have tested the login with some accounts and i'm sure that the username and password are correct.
You can very simple the script, if you have a vbulletin installation and a activated api function.
All what you need is to edit the variable $apiurl and $apikey and uplodad the script to your webspace.
I would be very appreciated if someone can help me. :-)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Badshah93
21 Apr 2012, 20:26
i have used curl and few other methods for doing vbulletin functions through a script but never tried vbulletin api. So took a few hrs to understand vbulletin API.
Try this script (it is working for me)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
gigagon
21 Apr 2012, 20:54
Thank you very much, it works for me too! :-)
Do you know, how i can realize a permanente login to the forum?
My target is to implement a bridge between the cms contao and vbulletin.
So i need a login to authenticate the user in contao and vbulletin.
The master system is vbulletin and the slave system is contao.
Can i geneate cookies or set the status to "everytime logged in" with the api?
many greetings
gigagon
[~AlmoR~]
16 May 2012, 23:20
Do you know, how i can realize a permanente login to the forum?
I'm struggling with the same issue. Did you manage to get past this hurdle?
weissmad
27 Dec 2012, 12:51
Badshah93 - good example earlier as the documentation led me astray...even your password field being called vb_login_md5password rather than vb_login_password was helpful as the online documentation didn't show that.
Now onto my question...
VB posts a link for API overview/documentation:
https://www.vbulletin.com/forum/content.php/367-API-Overview
I'm trying to see documentation for executing a forum search and then retrieving the results. I can see from the "All" methods page that it's under "Advanced Search Methods", but after logging in I'm being told I do not have permission to access this page.
From the "All Methods" page I see these which might do the trick, but there's no documentation on how to use them:
search_intro
--Return advanced search form related data.
search_process
--Process search and generate a searchid.
search_showresults
--Show search results.
search_getdaily
--Get new threads/posts posted in X day(s).
search_getnew
--Get new threads/posts posted since last visit.
search_finduser
--Find threads/posts posted by a specific user.
search_doprefs
--Save search preferences for logged-in user.
The methods I imagine I would need documentation for are search_process and search_showresults.
I'm on 4.2.0 Patch Level 3...thanks in advance for any help
weissmad
03 Jan 2013, 16:24
bump
Bundschuh
05 Mar 2013, 10:27
search_intro
--Return advanced search form related data.
search_process
--Process search and generate a searchid.
search_showresults
--Show search results.
search_getdaily
--Get new threads/posts posted in X day(s).
search_getnew
--Get new threads/posts posted since last visit.
search_finduser
--Find threads/posts posted by a specific user.
search_doprefs
--Save search preferences for logged-in user.
Searching only requires:
search_process -> gives you an id to retrieve search results
search_showresults -> returns the results for given id
Parameters for search process are mostly the same as they are used in advanced search in usercp:
For example:
query = 'find*me' // search query
forumchoice = '1,2,3,4' // only in listet forums
childforums = 1 // also search in child forums
titleonly = 0 // searches only in titles
contenttypeid = 1 // searches only in posts (not blogs, groups, etc)
Have a closer look to search.php
Major parameters for search_showresult are: page, perpage and searchid
Greetings
Bundschuh
weissmad
03 Apr 2013, 21:14
Bundschuh - thanks for the reply.
Using the site through a browser I can get the desired results:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Relating this to my PHP code using the API has proven difficult. Either there are certain parameters which have dependencies or the parameters that I am passing aren't formatted properly (or a combination of both).
When I use the API if I specify the forumchoice as the URL parameter with the [] in the name, I get an api error: Invalid API Signature.
Here's what I'm passing in the api specific parms:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
vBulletin® v3.6.12, Copyright ©2000-2013, Jelsoft Enterprises Ltd.