# Trouble accessing developer sandbox through the API

**URL:** https://community.fireblocks.com/t/trouble-accessing-developer-sandbox-through-the-api/2486
**Category:** Support
**Created:** [May 23, 2025, 7:38pm UTC](https://community.fireblocks.com/t/trouble-accessing-developer-sandbox-through-the-api/2486 "2025-05-23T19:38:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sandbox](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sandbox](https://community.fireblocks.com/u/sandbox)
#### Post date: [May 23, 2025, 7:38pm UTC](https://community.fireblocks.com/t/trouble-accessing-developer-sandbox-through-the-api/2486/1 "2025-05-23T19:38:37Z")

</div>

Hello,

We are looking to use Fireblocks through the API and we are working in the developer sandbox environment.

We are using the REST API in C++ through the libcurl library.

When I send a request to get assets (“/v1/assets”), I am getting back the following response:

[!DOCTYPE html]  
[h2 class=“cf-subheadline”\>You are unable to access fireblocks.io\</h2]

I am not sure what is failing and where.

1. Is there an issue with the request?
2. Is there an issue with the signing of the request?
3. Is there an issue with my API key that I am using?
4. Or something else?

Any pointers on this will be appreciated.

Best,  
AJ

---

<div class="post-metadata">

### Author: ![sandbox](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sandbox](https://community.fireblocks.com/u/sandbox)
#### Post date: [May 24, 2025, 1:39am UTC](https://community.fireblocks.com/t/trouble-accessing-developer-sandbox-through-the-api/2486/2 "2025-05-24T01:39:33Z")

</div>

It turns out that my code had a bug where I was not hex-encoding the bodyHash in the JWT. Now that I am setting the bodyHash with a hex-encoded value, I am getting a proper JSON response back - but now, the response says this { “message”: “jwt malformed”, “code”: -1}. Trying to figure out what is wrong with the JWT now.  
Best,  
AJ

---

<div class="post-metadata">

### Author: ![rotem](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rotem](https://community.fireblocks.com/u/rotem)
#### Post date: [May 25, 2025, 2:24pm UTC](https://community.fireblocks.com/t/trouble-accessing-developer-sandbox-through-the-api/2486/3 "2025-05-25T14:24:50Z")

</div>

Hi AJ,

Malformed JWT refers to improper serialization of the JWT.  
The JWT format is as follows:

```auto
payload = {
        "uri": path,
        "nonce": nonce,
        "iat": now,
        "exp": expiration,
        "sub": api_key,
        "bodyHash": body_hash
    }

```

Then signed with your Private key using the RS256 algorithm.

```auto
token = jwt.encode(
        payload,
        private_key,
        algorithm="RS256"
    )

```

You can also refer to examples (We do not have an example in c++ but have an c#/rust)

> **[developers-hub/authentication\_examples at main · fireblocks/developers-hub](https://github.com/fireblocks/developers-hub/tree/main/authentication_examples)**
>
> Fireblocks Developers Hub is a mono repo for Fireblocks API related snippets and code examples - fireblocks/developers-hub

---

<div class="post-metadata">

### Author: ![sandbox](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sandbox](https://community.fireblocks.com/u/sandbox)
#### Post date: [May 27, 2025, 3:32pm UTC](https://community.fireblocks.com/t/trouble-accessing-developer-sandbox-through-the-api/2486/4 "2025-05-27T15:32:27Z")

</div>

Hi Rotem,

Thanks for looking into this.

Turns out my issue was that I was using base64 encoding instead of base64url encoding. That seems to have resolved my issue. Since there were no C++ example, I just followed what was in the “Autheticate ([Authenticate](https://developers.fireblocks.com/reference/signing-a-request-jwt-structure))” documentation (which says base64 encoding) - it might help someone else in the future if it is changed to base64url encoding.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/fireblocks/original/1X/5f71d4b7b9f5379f88097428f75ffbad4945a14b.png)

Best,  
AJ
