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 8007941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:59:15+00:00 2026-06-04T17:59:15+00:00

http://127.0.0.1:8080/Mailchimp/Access#access_token=^^^^^^^^^^^^^^^^^^^^^^^^^&expires_in=0 This is my mailchimp url , how to extract the access_token through java

  • 0
http://127.0.0.1:8080/Mailchimp/Access#access_token=^^^^^^^^^^^^^^^^^^^^^^^^^&expires_in=0

This is my mailchimp url , how to extract the access_token through java

and there another way to get the access token but here getting response message – Bad Request

URL siteUrl = new URL("https://login.mailchimp.com/oauth2/token");
        HttpURLConnection conn = (HttpURLConnection) siteUrl.openConnection();
        conn.setRequestMethod("POST");
        conn.setDoOutput(true);
        conn.setDoInput(true);

        DataOutputStream out = new DataOutputStream(conn.getOutputStream());

        String content = "?grant_type=authorization_code&client_id=^^^^^^^^^^&client_secret=^^^^^^^^^^^^^^^^^^^^^^^^&code="+auth_code+"&redirect_uri=http://127.0.0.1:8080/Mailchimp/Access";

        out.writeBytes(content);
        System.out.println(content);
        out.flush();
        out.close();
        System.out.println(conn.getResponseMessage());
  • 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-04T17:59:17+00:00Added an answer on June 4, 2026 at 5:59 pm

    The part after the # is called the “fragment” or “reference”. This is a basic way to extract the relevant part:

    public static String getAccessToken(String uriString) {
        URI uri = URI.create(uriString);
        String[] parameters = uri.getFragment().split("\\&");
        for (String parameter : parameters) {
            String[] parts = parameter.split("\\=");
            if (parts[0].equals("access_token")) {
                if (parts.length == 1) {
                    throw new RuntimeException("missing access token");
                }
                return parts[1];
            }
        }
        throw new RuntimeException("no access token");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Post Controller , URL is like this : http://127.0.0.1/post/5006/some-text-for-seo-friendly {contoller}/{id}/{seo} public ViewResult Index(){
I use urllib2.urlopen(url) to get HTML content. The URL is http://127.0.0.1:8000/m.html/ . This method
Hey someone know how can match this URI http://localhost:8080/test/user/127.0.0.1:8002:8 with @RequestMapping. I try to
I got a PL/SQL Web Toolkit project not online (url : http://127.0.0.1:8080/dad/my_procedure ). And
Current url is http://myapp.appspot.com/something/<user-id> or http://127.0.0.1:8080/something/<user-id> How in my python code I can get
my ajax is : $('#save').click(function(){ $.post(http://127.0.0.1:8080/sss, function(data){ alert(data); }); }) and the django view
the url is http://127.0.0.1:8000/maps/map/wwww/ ' how to get the last word thanks
Using this railscast http://railscasts.com/episodes/127-rake-in-background?autoplay=true as an example/inspiration (i.e. I'm not trying to implement the
http://127.0.0.1:8080/testserver testserver should it be the servlet name of classname of the servlet ?
As the title described, Django keeps changing my URL from /localhost/ to /127.0.0.1:8080/ which

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.