vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Invalid API Signature (https://vborg.vbsupport.ru/showthread.php?t=295146)

tonycost 02-14-2013 08:24 PM

Invalid API Signature
 
Alright I can call the Mobile API api_init method successully, but when I try to login I get an Invalid API Signature Response everytime. Here is what my code looks like:

String login = "http://www.test/cp,/support/api.php?api_m=login_login"+
"&api_c="+ apiClientId +
"&api_s="+ apiAccessToken +
"&api_sig="+apiSignatureSignature +
"&api_v=6"+
"&vb_login_password=mypassword"+
"&vb_login_username=myuser"
;

api signature is built like this:

StringBuilder apiSignature = new StringBuilder();
apiSignature.append("api_m=login_login");
apiSignature.append("&vb_login_password=mypassword ");
apiSignature.append("&vb_login_username=mylogin");
apiSignature.append(apiAccessToken);
apiSignature.append(apiClientId);
apiSignature.append(secret);
apiSignature.append(apiKey); <-- I get this from the admin section my forum

and then hashed using MD5

Does this look right?

Couple questions:

I have seen some examples where the last bit apiKey was not added - is this necessary and does this come from the admin console?

The apiClientId I get back is 1 - is this as expected?

At one point I was using my admin user name as my client id, per an example I saw - which when I was doing that I was getting a bad login response - what would come first with in terms of errors and Invalid API Signature or Bad Login.

Any help would be greatly appreciated.


All times are GMT. The time now is 10:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00953 seconds
  • Memory Usage 1,705KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete