PHP SDK - Troubleshooting and Support assistance

Modified on Thu, 02 Feb 2023 at 05:17 PM

TABLE OF CONTENTS



How to use the PHP SDK

Using manual payloads in PHP is strongly discouraged as they are unsafe, prone to errors, and do not provide all the necessary information for troubleshooting. Instead, we strongly recommend using the search functionality or manually navigating to your package of interest in the PHP SDK.


The PHP SDK documentation is available at the following link.



Getting Started

  1. Load the repository or composer require tatumio/tatum-php
  2. Create an instance $sdk = new \Tatum\Sdk()
  3. Enjoy!


Good to know

  • The first subchapter for all methods contains a link to examples.

  • All API examples have debugging implicitly enabled 



How to submit a ticket to Support

  1. Make sure debugging is enabled. More information is available at the following link.
    // Enable debugging on MainNet
    $sdk->mainnet()->config()->setDebug(true);
    
    // Enable debugging on TestNet
    $sdk->testnet()->config()->setDebug(true);
    
    //NOTE: You can put your entire call into a try {} catch (Exception $exc) {} block to get a cleaner output
  2. Check the article How to report issues and bugs.
  3. Include a copy+paste of the debugging code into your ticket.


Example code (debugging enabled):

>>>>>>>>>>> Tatum API REQUEST TestNet >>>>>>>>>>>>
curl -i -X POST \
  'https://api.tatum.io/v3/bitcoin/wallet/priv?type=testnet' \
  -H 'Host: api.tatum.io' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'x-api-key: abc******xyz_100' \
  -H 'User-Agent: Tatum_SDK_PHP/2.0.0 (Bitcoin, DEBUG)' \
  -d '{
    "index": 1,
    "mnemonic": "******"
}' 
>>>>>>>>>>> /Tatum API REQUEST TestNet >>>>>>>>>>>
<<<<<<<<<<< Tatum API RESPONSE TestNet <<<<<<<<<<<
Status code: 200
Headers:
* Date: Fri, 06 Jan 2023 15:52:38 GMT
* Content-Type: application/json; charset=utf-8
* Content-Length: 62
* Connection: keep-alive
* x-dns-prefetch-control: off
* expect-ct: max-age=0
* x-frame-options: SAMEORIGIN
* strict-transport-security: max-age=15552000; includeSubDomains
* x-download-options: noopen
* x-content-type-options: nosniff
* x-permitted-cross-domain-policies: none
* referrer-policy: no-referrer
* Server: cloudflare
* CF-RAY: 78559f380aa6bba4-FRA
Body:
{
    "key": "******"
}
<<<<<<<<<< /Tatum API RESPONSE TestNet <<<<<<<<<<<
All sensitive information is automatically removed via the sanitizer function. 
More information is available at the following link.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article