Is there anyone here ever worked on bitgo in perl
am really facing a problem. the last key the api is saying
{"error":"invalid key: 1ba6169a3a091f295b4af75c740b9143","name":"Invalid","requestId":"ckypyzow13fdv08037p4ig5qu","context":{}} Bad Request
any key am trying to put its just occurring that error
other thing when i try to add isCold => 1, in REQUEST BODY SCHEMA
its occuring that isCold must be boolean. yet i have set it to 1
API Reference (JavaScript): https://www.bitgo.com/resources/training-guide?selected-tab-id=advanced-wallet-operations
API Reference (HTTP Post): https://app.bitgo.com/docs/#operation/v2.wallet.listtransfers
#!/usr/bin/perl use lib '.'; use strict; use warnings; use HTTP::Tiny; use JSON; use Data::Dumper; use CGI; use JSON::XS; use Digest::MD5 qw(md5_hex); use JSON::Create 'create_json'; use constant false => 0; use constant true => 1; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); print "Content-type: text/html\n\n"; my $md5_data = "FB5alkerbyE1!"; # USER KEY my $md5_data1 = "ASKkerbyC45!#4KK0"; # BACKUP KEY my $md5_data2 = "JJBTkerbyC45!#400"; # BITGO KEY my $md5_hash = md5_hex( $md5_data ); my $md5_hash1 = md5_hex( $md5_data1 ); my $md5_hash2 = md5_hex( $md5_data2 ); my $url = "https://app.bitgo.com/api/v2/btc/wallet"; my $json = encode_json { # isCold => 1, # if enabled this is the error it occur {"error":". +isCold should be boolean label => "WallZZZ", m => 2, n => 3, keys => ["$md5_hash","$md5_hash1","$md5_hash2"] }; my $http = HTTP::Tiny->new( default_headers => { Authorization => 'Bearer v2x8860bb4d615cf139191b1e98a69598cae4 +aded3c71f007c67', } ); my $response = $http->post( $url => { content => $json, headers => { 'Content-Type' => 'application/json' }, }); if ( $response->{'is_success'} ) { print Dumper( decode_json $response->{'content'} ); } else { print "$response->{'content'} $response->{'reason'}\n"; }
In reply to bitgo problem by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |