How to get forge invocation token from forge remote?


I am working with forge remote, and one of the documents say:

I am trying to call Storage API from azure function side, and I wonder how to get context.cloudId from FIT.

According to ‘forge remote essentials’ document,

The FIT will be provided as bearer token under the ‘authorization’ inside the request header. It is also noted that FIT will be JSON object containing the information that I need such as appId, cloudId and so on.

However, the ‘authorization’ field I get inside the request header looks like a normal token:

I was wondering, is there specific action that I need to do, or I am doing something wrong?




It’s not explained well in that block of documentation, but elsewhere in the docs it mentions the FIT is a JWT token. To confirm, you should be able to use the site I linked to find the JSON contents. In your Azure function, you will need to use a JWT library to decode and verify the FIT.

Hello, thanks for the reply.

I have another question, and it’s about this:

I wonder if this bearer token that I have to supply is the one that I get from request headers?

If so, should I provide it as encrypted JWT token?

Also, I will mark your reply as the solution as it answers the original question.