# KAS Node를 이용한 메소드 호출하는 방법은 없을까요?

**URL:** <https://devforum.kaia.io/t/kas-node/7231>\
**Category:** Orakl Network\
**Created:** [4월 22, 2024, 8:21오전 UTC](https://devforum.kaia.io/t/kas-node/7231 "2024-04-22T08:21:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ToTheMoon](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@ToTheMoon](https://devforum.kaia.io/u/ToTheMoon)\
**Post date:** [4월 22, 2024, 8:21오전 UTC](https://devforum.kaia.io/t/kas-node/7231/1 "2024-04-22T08:21:07Z")

</div>

안녕하세요.

Baobab Wallet을 이용해서 Contract를 배포해서 테스트를 완료했습니다.  
여기서 궁금한게 생겼는데  
Web3j 객체를 생성할 때 public node를 이용해서 객체를 생성했습니다.

이 public node를 KAS Node를 이용해서 제가 배포한 Contract를 호출할 수 있을까요?

KAS Node를 이용해서 아래와 같이 호출했는데

```auto
HttpService httpService = new HttpService(caverKasNodeUrl);
httpService.addHeader("Authorization", okhttp3.Credentials.basic(accessKey, secretAccessKey));
httpService.addHeader("x-chain-id", kasChainId);

// web3j 객체생성
Web3j web3j = Web3j.build(httpService);
Credentials credentials = Credentials.create(privateKey);
BigInteger GAS_LIMIT = new BigInteger("2000000");

EthGasPrice gas = web3j.ethGasPrice().send();
BigInteger gasPrice = gas.getGasPrice();

VRFConsumer vrfConsumer = new VRFConsumer(vrfConsumerAddress, web3j, credentials, new StaticGasProvider(gasPrice, GAS_LIMIT));

```

이렇게 호출하였고 아래처럼 오류가 발생했습니다.

```auto
Invalid response received: 401; {"code":1010009,"message":"The credential you provided does not match in our record.","requestId":"4477226b-7e23-47df-a1b1-afb43a768a69"}

```

---

<div class="post-metadata">

**Author:** ![Nick\_Park](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/nick_park/32/3437_2.png) [@Nick\_Park](https://devforum.kaia.io/u/Nick_Park)\
**Post date:** [4월 22, 2024, 9:00오전 UTC](https://devforum.kaia.io/t/kas-node/7231/2 "2024-04-22T09:00:59Z")

</div>

안녕하세요 ToTheMoon님,

해당 에러는 Orakl과 무관한, KAS Node와 관련된 에러로 보입니다.

> [@KAS Forum Migration / KAS 포럼 이관](https://devforum.kaia.io/t/kas-forum-migration-kas/4254):
>
> KAS developer forum is moved from Klaytn Forum to a separate forum page provided by KAS Help Center. Therefore, if you have any questions regarding KAS after this date, make sure to visit our new KAS forum page instead of the KAS category within the existing Klaytn Forum. Help Center Link [KR][https://support.klaytnapi.com/hc/ko](https://support.klaytnapi.com/hc/ko) [EN][https://support.klaytnapi.com/hc/en-us](https://support.klaytnapi.com/hc/en-us) New Community Link [KR][https://support.klaytnapi.com/hc/ko/community/topics](https://support.klaytnapi.com/hc/ko/community/topics) [EN][https://support.klaytnapi.com/hc/en-us…](https://support.klaytnapi.com/hc/en-us/community/topics)

하단의 페이지에서 문의해주시면 감사하겠습니다

> **[Klaytn API Service Help Center](https://support.klaytnapi.com/hc/ko)**
>
> We’re here to help you learn about Klaytn API Service.
