# Getf binary API not working in C++ SDK

**URL:** <https://community.cumulocity.com/t/getf-binary-api-not-working-in-c-sdk/1318>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [August 12, 2020, 4:05am UTC](https://community.cumulocity.com/t/getf-binary-api-not-working-in-c-sdk/1318 "2020-08-12T04:05:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![veenit.vora](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@veenit.vora](https://community.cumulocity.com/u/veenit.vora)\
**Post date:** [August 12, 2020, 4:05am UTC](https://community.cumulocity.com/t/getf-binary-api-not-working-in-c-sdk/1318/1 "2020-08-12T04:05:30Z")

</div>

Hello All,

I am using the following code snippet to get a file from Cumulosity platform to a device (I am pushing a configuration binary from platform to device and this is the code snippet of handler of instruction handler to push the file - written on the agent side):

virtual void operator()(SrRecord &r, SrAgent &agent)  
{  
const string fToStore(“cfgFile.txt”);  
SrNetBinHttp srBinObj(agent.server(),agent.auth());  
srBinObj.getf(r.value(3),fToStore)  
}

r.value(3) is value of c8y\_DownloadConfigFile.url and has the form “https:///inventory/binaries/binaryID”.

Am consistently getting error 404 for resource not found for mentioned URL.

Any help is appreciated here. Thanking all in advance.

Thanks and Best Regards.

---

<div class="post-metadata">

**Author:** ![Gyan\_Awasthi1](https://avatars.discourse-cdn.com/v4/letter/g/eada6e/32.png) [@Gyan\_Awasthi1](https://community.cumulocity.com/u/Gyan_Awasthi1)\
**Post date:** [August 13, 2020, 7:36am UTC](https://community.cumulocity.com/t/getf-binary-api-not-working-in-c-sdk/1318/2 "2020-08-13T07:36:13Z")

</div>

@veenit.vora, just a suggestion, you may want to look linux agent sample to get some help.  
I assuming you are using C++ device SDK.

[https://cumulocity.com/guides/device-sdk/cpp/](https://cumulocity.com/guides/device-sdk/cpp/)

The following list presents the existing agent software implemented on the C++ SDK.

NetComm agent  
Smartrest agent is an agent software implemented for NetComm NTC-6200 and NTC-140w routers, which is used in many production projects.

[https://bitbucket.org/m2m/cumulocity-agents-netcomm](https://bitbucket.org/m2m/cumulocity-agents-netcomm)

Linux agent  
Linux agent is a reference agent implementation, which can be used on any devices that are powered by a generic Linux distribution, e.g., Ubuntu, Fedora, etc.

[https://bitbucket.org/m2m/cumulocity-agents-linux](https://bitbucket.org/m2m/cumulocity-agents-linux)

---

<div class="post-metadata">

**Author:** ![veenit.vora](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@veenit.vora](https://community.cumulocity.com/u/veenit.vora)\
**Post date:** [August 14, 2020, 4:55am UTC](https://community.cumulocity.com/t/getf-binary-api-not-working-in-c-sdk/1318/3 "2020-08-14T04:55:16Z")

</div>

@Gyan_Awasthi1  
Thank you for the reply.  
Yes, I am using the C++ device SDK.  
I have already had a look at Netcomm agent. My implementation is similar to what is implemented there. The only difference is that it is implemented in Lua there and I have C++ code.

Shall look at the reference Linux agent and get back in case of further queries.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [April 2, 2021, 3:45pm UTC](https://community.cumulocity.com/t/getf-binary-api-not-working-in-c-sdk/1318/4 "2021-04-02T15:45:03Z")

</div>


