Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How to send Token Request?

Received: by 10.90.106.15 with SMTP id e15mr2061527agc.7.1284668026074;
        Thu, 16 Sep 2010 13:13:46 -0700 (PDT)
X-BeenThere: globalgiving-api@googlegroups.com
Received: by 10.91.83.8 with SMTP id k8ls138309agl.0.p; Thu, 16 Sep 2010
 13:13:45 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.90.3.14 with SMTP id 14mr572043agc.47.1284668025560; Thu, 16
 Sep 2010 13:13:45 -0700 (PDT)
Received: by x24g2000pro.googlegroups.com with HTTP; Thu, 16 Sep 2010 13:13:45
 -0700 (PDT)
Date: Thu, 16 Sep 2010 13:13:45 -0700 (PDT)
In-Reply-To: <41b18b48-5ea1-4f5d-b7ad-8e32d5870d3d@t11g2000vbc.googlegroups.com>
X-IP: 96.49.133.227
References: <42d61da4-328b-4b83-a70f-9d6fb09ef92d@e20g2000vbn.googlegroups.com>
 <b22c4aa2-1c1b-43c3-816c-6af3bac12320@z30g2000prg.googlegroups.com>
 <c5fd0ba8-6d7e-449b-8e07-e5ecdae7f838@k30g2000vbn.googlegroups.com>
 <ac84baf8-9007-4faa-a2ab-edc38ed032dc@m1g2000vbh.googlegroups.com>
 <4c207bc8-b86f-4db6-9a87-95773b899ef8@g6g2000pro.googlegroups.com> <41b18b48-5ea1-4f5d-b7ad-8e32d5870d3d@t11g2000vbc.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
 AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.A.B.C Safari/525.13,gzip(gfe)
Message-ID: <0008839c-357a-4d78-94d7-e69cc289de32@x24g2000pro.googlegroups.com>
Subject: Re: How to send Token Request?
From: "marcelo.barth" <marcelo.ba...@gmail.com>
To: GlobalGiving API <globalgiving-api@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Ellen,

I just improved the error message to highlight the error that is
occurring. In your case there were 2 problems with the XML submitted.

1) the xml declaration has an extra space in it at the end after the
'?': <?xml version=3D\"1.0\" encoding=3D\"UTF-8\"? > should be <?xml
version=3D\"1.0\" encoding=3D\"UTF-8\"?>

2) there's an extra space after the closing '/' in the auth_request
element: </ auth_request> should be </auth_request>

Now the error messages will look like the following, highlighting the
problem:

1)

<?xml version=3D'1.0' encoding=3D'UTF-8'?>
<error_response>
  <error_code>400</error_code>
  <errors>
    <error>
      <error_message>Problem with received message of content type
[application/xml]. Problem area [The XML declaration must end with "?
>".]</error_message>
    </error>
  </errors>
  <status>Bad Request</status>
</error_response>

and

2)

<?xml version=3D'1.0' encoding=3D'UTF-8'?>
<error_response>
  <error_code>400</error_code>
  <errors>
    <error>
      <error_message>Problem with received message of content type
[application/xml]. Problem area [The element type "auth_request" must
be terminated by the matching end-tag "&lt;/auth_request>".]</
error_message>
    </error>
  </errors>
  <status>Bad Request</status>
</error_response>

Hope that helps in your development.

Thanks,
Marcelo

On Sep 16, 12:34=A0pm, Ellen <ellen.hu...@gmail.com> wrote:
> Marcelo,
>
> The code will stop at =A0 rsp =3D req.GetResponse();, and I am getting th=
e
> same error-- bad request.
>
> have you counter this kind of issue before?
>
> what I could think is 1)request didn't well formed? 2) =A0request didn't
> match your end format? 3)or simply end won't pick a call from .net
> platform?
>
> Sorry to bother you again,
>
> ellen
>
> On Sep 16, 12:05=A0pm, "marcelo.barth" <marcelo.ba...@gmail.com> wrote:
>
>
>
> > Hi Ellen,
>
> > The accounts on our test server (api-test) were not fully replicated
> > with the accounts from production. It has been updated so you should
> > be able to retrieve a token now.
>
> > I ran a test using the credentials you provided and retrieved a token
> > successfully pointing to our test server.
>
> > Let us know if you experience anymore issues.
>
> > Thanks,