Webdav with OAuth2, 401

Hey guys,
the problem im facing is, when i try to connect to nextcloud from webdav, i am trying to use the OAuth2 token, OAuth2 — Nextcloud latest Administration Manual latest documentation , with following code.

import {AuthType, createClient} from "webdav";

const client = createClient("https://my-url/remote.php/dav/files/test/", {
      authType: AuthType.Token,
      token: {
        access_token: "mytoken"
      },
    });

I always get the error 401

<d:error xmlns:d=“DAV:” xmlns:s=“sabre/dav”>\n’ +
’ <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>\n’ +
" <s:message>No public access to this resource., No ‘Authorization: Basic’ header found. Either the client didn’t send one, or the server is misconfigured, No ‘Authorization: Bearer’ header found. Either the client didn’t send one, or the server is mis-configured, No ‘Authorization: Basic’ header found. Either the client didn’t send one, or the server is misconfigured</s:message>\n" +
‘</d:error>\n’

headers: {
Accept: ‘application/json, text/plain, /’,
Authorization: ‘undefined mytoken’,
‘User-Agent’: ‘axios/0.27.2’
},

Hope anyone can help.