In the WebService connector, we set Authentication type to API Token and set the API token in the appropriate field. When adding a HTTP Operation header with key=“x-api-key” and value = “$application.accesstoken$”, the connector fails with a 403 error.
If I paste the literal token into the value field, the connector succeeds.
Am I missing something on the use of the $application.accesstoken$ variable?
I don’t see any direct issues based on the description you posted.
But here are few things I would try to get better insights on what went wrong,
You can take a look at the VA log and revise the log level to print everything (DEBUG/TRACE) to see if it prints the entire request for further debugging.
Try the curl alternative which practically does the same thing,
If you have hold of the network connected to the VA, you can run some simple HTTP/Port listeners. Some thing like,
nc -l -p 8080
This opens a listener and you can point your base URL in the Web Service connector to point at it and trigger the HTTP Operation. The listener would give you a detailed log on what the request from SailPoint looks like.
Key differentiators based on the finding would be,
Is the variable $application.accesstoken$ replaced with an empty string? - IDN is Substituting something but not the API Token.
Is $application.accesstoken$ printed directly in the headers without any substitution? - IDN is not able that its a variable. Something about that header or other headers could have broke it.
For me it is working when using custom authentication and adding the value as the private key password. In the header i am using key=“x-api-key” and value=“$application.private_key_password$”