Page History
...
To add a header to your request, use the AddHeader method of the Options object.
#Request.Options.AddHeader Name('API-VERSION') Value('2.0')
For the Authorization header, there are two methods provided for your convenience (which are basically just shortcuts for manually invoking AddHeader):
...
Basic Authorization uses username and password for authentication and authorization of resources. It is not common to see APIs that would use this authorization method. Most services would either use API keys or access tokens.
Example of usage:
#Request.Options.AddBasicAuthorization UserName('my-username') Password('my-password')
Authorization using Bearer Token
Bearer tokens allow access to protected resources. The token contains the complete information (in an encrypted form) of what resources it allows to access (unlike a session key, which is simply a key, and on its own does not mean anything).
#Request.Options.AddBearerAuthorization Value('token')
As a bearer token is the actual representation what resources the bearer can access, it does not have a fixed length. Tokens from the same service can vary in length, and they can be very long. Bear this in mind when you are passing the value around using fields, make sure that your fields are long enough the hold the full length of the token.
...