GetTransaction Access API Method
Parameters
Id
bytes
REQUIRED
Loading...
Returns
transaction
object
Loading...
script
string
Loading...
arguments
string
Loading...
reference_block_id
string
Loading...
gas_limit
integer
Loading...
proposal_key
object
Loading...
address
string
Loading...
key_id
integer
Loading...
sequence_number
integer
Loading...
payer
string
Loading...
authorizers
array
Loading...
payload_signatures
array
Loading...
address
string
Loading...
signature
string
Loading...
envelope_signatures
array
Loading...
address
string
Loading...
signature
string
Loading...
Request
1package main23import (4"context"5"encoding/hex"6"encoding/json"7"fmt"8"log"910"github.com/onflow/flow/protobuf/go/flow/access"11)1213func main() {1415// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.16client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17ctx := context.Background()18if err != nil {19log.Fatalf("err: %v", err)20}2122// Get Transaction by ID23transactionId, err := hex.DecodeString("45c36ca2e7ac95eaeb1f66b12ff55d51ae976abc026a8e81ed081ad54e0e66c7")24if err != nil {25log.Fatalf("err: %v", err)26}27transactionResp, err := client.GetTransaction(ctx, &access.GetTransactionRequest{Id: transactionId})28respJSON, err := json.Marshal(transactionResp)29if err != nil {30log.Fatalf("err: %v", err)31}32fmt.Println("GetTransaction response:", string(respJSON))33}
1package main23import (4"context"5"encoding/hex"6"encoding/json"7"fmt"8"log"910"github.com/onflow/flow/protobuf/go/flow/access"11)1213func main() {1415// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.16client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17ctx := context.Background()18if err != nil {19log.Fatalf("err: %v", err)20}2122// Get Transaction by ID23transactionId, err := hex.DecodeString("45c36ca2e7ac95eaeb1f66b12ff55d51ae976abc026a8e81ed081ad54e0e66c7")24if err != nil {25log.Fatalf("err: %v", err)26}27transactionResp, err := client.GetTransaction(ctx, &access.GetTransactionRequest{Id: transactionId})28respJSON, err := json.Marshal(transactionResp)29if err != nil {30log.Fatalf("err: %v", err)31}32fmt.Println("GetTransaction response:", string(respJSON))33}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free