Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8307097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:27:40+00:00 2026-06-08T18:27:40+00:00

Here’s what i have tried soo far.. <html> <head> <title>bugstats.com</title> </head> <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js></script>

  • 0

Here’s what i have tried soo far..

<html>
  <head>
    <title>bugstats.com</title>
  </head>
<script type="text/javascript"     src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://jquery-json.googlecode.com/files/jquery.json-    1.3.min.js"></script>
<script type="text/javascript" >
function hello(){
var myObject = {"method":"User.login", /* is this the right method to call? */
"params":[  { "login" :"user", /*should i include the login credentials here? */
"password" : "pass123" , 
"remember" : "True"} ]  };
var enc = $.toJSON(myObject);

$.ajax({"contentType":"application/json",
    "data": enc, 
    "crossDomain":"true",
    "dataType": "json", 
    "url": "https://bugzilla.company.com/bugzilla/jsonrpc.cgi", /* is this correct or should it be https://bugzilla.company.com/bugzilla/jsonrpc.cgi?method=User.login? */ 
    "type": "POST",
    success: function(){
            alert("Hallelujah");
                console.log(arguments); 

             },
    error: function () {
    alert("Failed")
    }

   });
}
function parseResponse(obj){
 alert("Success")
 console.log(obj)
}
</script>
  <body>
    <h1>bugzilla.com</h1>
    <input type="button" onclick="hello()" value="Click">
</body>

Reading upon this JSONPRC, not getting far.

When i click the button – make a call, to login/do anything for that matter – i get the following error –

OPTIONS https://bugzilla.company.com/bugzilla/jsonrpc.cgi 403 (Forbidden) jquery.min.js:19
XMLHttpRequest cannot load https://bugzilla.company.com/bugzilla/jsonrpc.cgi. Origin http://172.16.229.137 is not allowed by Access-Control-Allow-Origin.

From my understanding, “Access-Control-Allow-Origin” is caused because of “same origin policy” problem and hence i should use “jsonp”. But,Jsonp – i.e, script injection can only be done via GET request. But,if i try the same JS script with a GET request – i get the following :

code: 32610
message: "For security reasons, you must use HTTP POST to call the 'User.login' method."

Confused on how to connect/login via Web services, i’m clearly doing something silly something majorly wrong here.. would be a great deal of help if anyone can help me connect and fetch the bug details.I’ve been at it since 8-10 days now.. 🙁

FYI:

  • I do not have access to the server

  • I’m on a client setup and accessing the Bugzilla server

Other links,

Ajax Call

Loggin In

BugzillaApc

Google Groups – Live conversation

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:27:41+00:00Added an answer on June 8, 2026 at 6:27 pm

    You need to be using the Bugzilla_login and Bugzilla_password parameters to authenticate every call, which will be GET using jsonp. Your call will look like the following, using User.get as an example:

    // Method parameters
    var params = [{
      /* The authentication parameters */
      "Bugzilla_login": "YourUserName",
      "Bugzilla_password": "YourPassword",
      /* The actual method parameters */
      "ids": [1, 2]
    }];
    var myObject = {
      "method": "User.get",
      "params": JSON.stringify(params)
    };
    
    $.ajax({"contentType": "application/json",
        "data": myObject, /* jQuery will handle URI encoding */
        "crossDomain": "true",
        "dataType": "jsonp", /* jQuery will handle adding the 'callback' parameter */
        "url": "https://bugzilla.company.com/bugzilla/jsonrpc.cgi", 
        "type": "GET",
        ...
    

    You have to do it this way because:

    • You will be making a cross-domain call
    • Because you can’t set things like Access-Control-Allow-Origin you’ll have to do it via jsonp (or proxying, but jsonp is simpler)
    • jsonp is necessarily a GET request, not POST

    The relevant docs:

    • Connecting via GET – You’ll be limited to retrieving information, changes require POST calls.
    • Logging in via Bugzilla_login and Bugzilla_password
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the Javascript I currently have <script type=text/javascript> $(function() { $('.slideshow').hover( function() {
Here's my code in the <head></head> : <link rel=stylesheet href=http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css /> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script>
Here is the script I'm using, copied directly from Google: <script type=text/javascript> var _gaq
Here is a simple timepicker to jQuery UI's datepicker <script type=text/javascript> /* <![CDATA[ */
here is code: <script type=text/javascript> function doit(){ $('table td').each(function () { if ($(this).text().trim() !=
Here is an example: I have the generic type called Account. I wish to
Here's a piece of code I copied from http://www.schillmania.com/content/projects/javascript-animation-1/demo/ Very simple JS animation: function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Here is my Default.aspx <%@ Page Language=C# AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default ValidateRequest=false %> <html> <head
Here is my SQL script CREATE TABLE tracks( track_id int NOT NULL AUTO_INCREMENT, account_id

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.