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

  • Home
  • SEARCH
  • 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 8157019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:08:17+00:00 2026-06-06T17:08:17+00:00

I am trying to login to a site using a login form and submit

  • 0

I am trying to login to a site using a login form and submit button in my app. I have been given the following api information:

the api has been set up at consumer.api.mobodev.terryinc.com

Using this api I am trying to login using a username. The following information has been provided for the api call:

Login with Username The Login with Username service is provided for
existing Consumers to login using their username and password. The
username will be either an email address or mobile phone number
depending on how the Consumer had initially registered. Login with
Username will typically be used when logging into a second or
subsequent Device, or via the browser etc. This is because in the
normal process flow, a Consumer will register and the Access Token
will be returned and cache by the Client Application. The Access
Token is then used when starting the application instead of getting
the Consumer to log in again. Calling the Login with Username logs the
Consumer into the system and creates and returns a valid OAuth Access
Token. The returned OAuth Access Token can then be used in for
subsequent API calls to identify the Consumer of the Client
Application. Attributes
Attribute Value

  • Path /v3/logins Support
  • Formats JSON, XML HTTP
  • Method POST
  • Secure No
  • Rate Limited
  • No Cache
  • Timeout TBC
    -HTTP Codes 200 – OK
    400 – Bad Request.
    500 – Internal Server Error.

Below is the code that I have written in the main activity:

 HttpClient httpclient = new DefaultHttpClient();

**HttpPost httppost = new HttpPost("consumer.api.mobodev.terryinc.com");**


    try {
        // Add user name and password
     EditText uname = (EditText)findViewById(R.id.username);
     String username = uname.getText().toString();

     EditText pword = (EditText)findViewById(R.id.password);
     String password = pword.getText().toString();

        List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(3);
        nameValuePairs.add(new BasicNameValuePair("grant_type","password"));
        nameValuePairs.add(new BasicNameValuePair("username", username));
        nameValuePairs.add(new BasicNameValuePair("password", password));
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

        // Execute HTTP Post Request
        Log.w("Post", "Execute HTTP Post Request");
        HttpResponse response = httpclient.execute(httppost);

        String str = inputStreamToString(response.getEntity().getContent()).toString();
        Log.w("Before Post", str.toString());

My question is did I use the correct url when creating my httpPost object?

Please help as I have no idea how to interpret the api documentation.

  • 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-06T17:08:19+00:00Added an answer on June 6, 2026 at 5:08 pm

    In Firefox, there’s this awesome add-on I use to simulate and test API calls – it’s called Rest Client, and I recommend you test the apis here first before you code anything.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to integrate a Facebook send button into my site using Facebook app.
I'm trying to add a login form onto my free mathhelp site, but whenever
I am trying to Login or SugarCrm using REST. I have this code,, //Login
I am trying to create a secure login for my site, who's form logs
I'm trying to log onto the following website using HttpWebRequest: http://mostanmeldung.moessinger.at/login.php Texts are in
I have some tasks on a site in php using nginx that I'm trying
I'm trying to access a website using my login credentials through an iPhone app
Iam trying to login to a https secured site using Apache commons httpclient. Iam
I'm trying to login to a remote web site using CURL, but can't seem
Well, I am trying to login to a site using Python and mechanize. I've

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.