05-06-2020 19:08 - edited 05-06-2020 19:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-06-2020 19:08 - edited 05-06-2020 19:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I think the Campanion api can do that, but if you look closely, it doesn't seem like it, so I ask for help.
If yes, please tell me how to do it
my device versa2 / s8+
Answered! Go to the Best Answer.

Accepted Solutions
05-06-2020 19:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-06-2020 19:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Not using the SDK. Your only options are fetch() or WebSocket. That said, you can write your own server and host it on the companion device.
If you can't go via a server, you'll have to use the Web API.
Gondwana Software

05-06-2020 19:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-06-2020 19:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Not using the SDK. Your only options are fetch() or WebSocket. That said, you can write your own server and host it on the companion device.
If you can't go via a server, you'll have to use the Web API.
Gondwana Software

05-06-2020 20:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-06-2020 20:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
There is api not supported by web api, so what I want is companion api :(...
Is there any other way?

05-06-2020 20:19 - edited 05-06-2020 20:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-06-2020 20:19 - edited 05-06-2020 20:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
No, you're going to need a server of some sort.
Gondwana Software

05-07-2020 06:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-07-2020 06:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The only method I know is to run either a webserver or websocket server in your app, and communicate from the companion using either fetch() or websocket.

05-07-2020 21:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-07-2020 21:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
So, are filetransfer and message api that mobile sends to server, not device? Is this right?

05-07-2020 21:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-07-2020 21:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
No. File transfer and message API are between the watch (device) and the clockface/app companion code, which runs within the Fitbit app. They won't help you to get your data outside of the Fitbit system. For that, you have to use fetch() or WebSocket, which can go from your clockface/app companion code to a server.
Gondwana Software

05-07-2020 23:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-07-2020 23:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I feel grateful Gondwana
So what is the last thing that file transfer and messaging api do? Can you give me an example?

05-07-2020 23:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-07-2020 23:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Documentation (with examples) is here and here.
The last thing that messaging can do is to populate a variable in your companion code.
The last thing that file transfer can do is to save a file on your companion device. Unfortunately, there's no way to directly access that file from outside of the companion code, so you have to read it into one or more variables in your companion code.
Gondwana Software

05-07-2020 23:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-07-2020 23:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Is the device that you are talking about here a fitbit device?
So what the file transfer api does is store the file on the fitbit device.
I definitely understand that there is no way to send from fitbit device to my phone without going directly through the server.
thx 🙂

05-08-2020 00:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-08-2020 00:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
It depends in which direction you're sending the file. In your case, you're probably sending it to the companion device (eg, phone). Therefore, the file will be on your phone, but not in any directory that you can access from outside of your companion code. That's why you need to onforward it to a server, even if the server is hosted on the phone.
Gondwana Software
05-08-2020 00:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-08-2020 00:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
It was really helpful
thx bro have a nice day 🙂
