I had a separate topic on this issue. See
https://forum.hosteng.com/index.php?topic=3817.0The bearer token string is JWL formatted and is 1355 characters long. I was able to recieve the API response with the token into a BRX byte buffer. Parsing out the token worked fine and then I have to make a new API request for data, adding the token as header. So I split the token into long strings (SLx) in order to pass it on to the new API request for data. The header field in the HTTPCMD instruction only supports strings up to 1024 characters so I hit the wall there. Then I resorted to using Node Red as the gateway.
As I also mentioned in the other topic, the PLC in this case is not using the data for any controls, the PLC is merely a gateway and is not really needed in the system. But I prefer using controllers we use every day and know in and out, i.e. BRX. But there are other cases where we want to use REST API data for control and in those cases it is a clear advantage to read API directly into PLC memory without any gateways.