Help with API login og password setting

I need a nice person that will help med with the setting of my API for Billy.
I have the docs here Billy API v2 Documentation |
I am not sure where and how to enter my login and password. Can someone please help me out with the missing fields.
Am I missing out something, please let me know.

1 Like

Check out the node js section of code examples for the Billy api.

You will find

headers: {
                    'X-Access-Token': this.apiToken,
                    'Content-Type': 'application/json'

This indicates the headers block should contain an object with 2 properties named X-Access-Token and Content-Type. Translating apis to Thunkable can be a challenge. Happy Thunking

Thanks for your fast reply. So nice of you.
I tryed this but it dont work, What am I doing wrong? Thanks

I now tryed this blocks
Headers text is : {‘X-Access-Token’: f2361bb93689d15fd588e582e32c2xxxxxxxxxx,‘Content-Type’: ‘application/json’}

This blocks makes this error…

Put quotes around the token as well.

Also, quickly skimming the documentation, I’m not sure if you can get the user info without an email and password. You might need to switch to a different command

@domhnallohanlon maybe you also can help with the blocks, please and thanks.

I have talked to their support and I just need the token. Is it JUST one place here “INSERT ACCESS TOKEN HERE” I need it or every place written $accesToken???

He send me this example below. The last example is how to make anew contact. But I really cant see the block in front of me for this example. Do I need all of the below code or what??
Thanks a lot for your help.

//define a reusable class for sending requests to the Billy’s Billing API
class BillyClient {
private $accessToken;

public function __construct($accessToken) {
$this->accessToken = $accessToken;

public function request($method, $url, $body = null) {
    $headers = array("X-Access-Token: " . $this->accessToken);
    $c = curl_init("" . $url);
    curl_setopt($c, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
    if ($body) {
        curl_setopt($c, CURLOPT_POSTFIELDS, json_encode($body));
        $headers[] = "Content-Type: application/json");
    curl_setopt($c, CURLOPT_HTTPHEADER, $headers);
    $res = curl_exec($c);
    $body = json_decode($res);
    $info = curl_getinfo($c);
    return (object)array(
        'status' => $info['http_code'],
        'body' => $body


$client = new BillyClient(“INSERT ACCESS TOKEN HERE”);

After this I can make a new contact with the following code:

//Create a contact
$res = $client->request(“POST”, “/contacts”, array(
‘contact’ => array(
‘organizationId’ => $organizationId,
‘name’ => “Arnold”,
‘countryId’ => “DK”
if ($res->status !== 200) {
echo “Something went wrong:\n\n”;

Hope you still wanna help. I found out I DONT need the mail and login. I just need the token.
I get this message back

400 Bad Request

Bad Request

Your browser sent a request that this server could not understand.
The number of request header fields exceeds this server's limit.

Apache/2.4.18 (Ubuntu) Server at Port 80

With this blocks image

@domhnallohanlon hope you will give me a hint here. Thanks…
The API docs is here · GitHub

It looks like the header should be a JSON object with two properties X-Access-Token and Content-Type. You provided a string which is not formatted as JSON.

Smiling yes i am just trying something because it wont work like that either.
You mean lige this right???

Using blocks like this can eliminate problems with correctly formatting JSON.


1 Like

THAT make sence THANKS. :grin:
But now I get a nother error like this.

{“meta”:{“statusCode”:404,“success”:false},“errorMessage”:“Unknown resource v2\/.”,“errorCode”:“UNKNOWN_RESOURCE”,“helpUrl”:“”}

now I get this message. Like there is some authenticating missing
{“meta”:{“statusCode”:401,“success”:false},“errorMessage”:“Invalid OAuth 2 access token.”,“errorCode”:“OAUTH_INVALID_ACCESS_TOKEN”,“helpUrl”:“”}