Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2019, 06:37 PM
PanterSi PanterSi is offline
 
Join Date: Oct 2009
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vB5 Mobile API logged in user authorization

We have problem with current logged in user authorization with VBulletin Mobile API v5.
Description of the problem:
We're calling API endpoints from a PHP project that is on a different domain than the actual VBulletin forum. First, we call login and get back correct response with sessionhash and userid and store the data in session.
Then, when we call any method that requires current logged in user, we get this response: errors: "no_permission_logged_out"

What data do we need to provide with each API request, to authorize the logged in user on every API request? is there any additional request data to be passed, that is not described in documentation?

link to example request function that returns this error: http://vb5support.com/resources/mapi..._saveSignature
Reply With Quote
  #2  
Old 12-04-2020, 05:29 PM
trippy1976 trippy1976 is offline
 
Join Date: Oct 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did you ever figure this out? I have the exact same problem. Contacted vBulletin for info since there is none to be found on Google and they just directed me back to this forum where this is the only thread I see with a similar issue. I get a successful login for a user, I get a session hash, I pass it with the next call and it fails with this error. Here is my full log from my script:


** 12/03/2020 21:48:05 submitting to https://9fb85c2cade8-042204.demo.vbu...api/user/login

** 12/03/2020 21:48:05 Post data is array (
'password' => 'labrat1234',
'md5password' => 'e497db5dcf836587ef35a974ee2fd8d7',
'username' => 'labrat',
)

** 12/03/2020 21:48:07 login response: '{"sessionhash":"8bfb07dea2776d52f510bb74595a9207" ,"userid":"3","password":"27b8a3afd7e70359a839b652 ccda58be71709612cd1dc7ec9ad7dec4","lastvisit":"160 6940634","lastactivity":"1606940580"}'

** 12/03/2020 21:48:07 Logged in Successfully
** 12/03/2020 21:48:07 Attempting signature edit...
** 12/03/2020 21:48:07 submitting to https://9fb85c2cade8-042204.demo.vbu.../saveSignature
** 12/03/2020 21:48:07 Post data is array (
's' => '8bfb07dea2776d52f510bb74595a9207',
'signature' => 'testing signatures',
)

string(52) "{"errors":[["no_permission_logged_out"]],"userid":0}"
Reply With Quote
  #3  
Old 03-31-2021, 11:16 PM
LuckyRiver's Avatar
LuckyRiver LuckyRiver is offline
 
Join Date: Jun 2013
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you get your problem solved?
I did not have that kind of permission error.
I somehow managed to get it working after days of pulling my hair out and almost gave up.
What I need is to authenticate a member to the site and retrieve his or her avatar.
But it is a complex process of signing the arguments calls using the token and the API key, now you got the idea how to do that, it just works.
Can't wait to integrate this new API authentication to a long overdue awesome texas hold'em poker game of mine.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03836 seconds
  • Memory Usage 2,182KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete