Problem to Connect to infura with Java Android

I downloaded the IPFS library as the following article

But it doesn’t show how to pass the credentials, like projectid and secretid

Follow the article, show me this error “android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)”

I know you need to send the information, but how to send this information to authenticate yourself?

private AppBarConfiguration appBarConfiguration;
private ActivityMainBinding binding;
MultiAddress IPFS_INFURA_URL = new MultiAddress("/dnsaddr/");

IPFS ipfsClient;

//Creating an IPFS client:

protected void onCreate(Bundle savedInstanceState) {
    new Thread(new Runnable() {
        public void run() {
            ipfsClient = new IPFS(IPFS_INFURA_URL);


i tryed with ultiAddress(“”) too

when after the last / is my project id


Hi @gabriel, I can’t see why you’d get “no address associated with hostname” - but then error messages don’t always accurately reflect the actual error!

You need to pass auth details like this:

add an auth header to your requests.

Hope that helps, let me know.

Warm regards,
Chris | Infura | ConsenSys

1 Like

Hi @chris.paterson

It’s my question, how send header request with IPFS Library.

Don’t it’s clear how send the information with MultiAddress or need use a class to send like a Httprequest


it was best dear go ahead with soft skin :zipper_mouth_face: :laughing:

I resolved sending the HTTPCONNECTION with my credentials TO IPFS CLASS, rewriting the and Mulpart.Java


so be succsssfull dear congrationaltions