Hi everyone,
I'm having a nightmare trying to use the OAuth 2 Access token generation in APIGee from an Azure Function.
So I have an Azure Function coded in C# using Rest sharp which is calling out API Proxy to get an Access token. We use this proxy in other applications and it works fine. We are using client_crendtial grant type. When I run the application locally I am able to get an access toekn with no issue in Postman or the browser, but when I publish it to the azure function, I get the following error:
{"Error":"Client credentials are required","ErrorCode":"invalid_client"}
I have found other Questions on this forum regarding this, and I think I have tried every combination of Parameters, headers etc in my request with no luck.
I've done:
<ClientId>request.formparam.client_id</ClientId>
I think thats everything I have tried.
Are there any specific issues that anyone is aware of when using an Azure Function to call APIGee like this? It's such a simple function which works fine locally so I know that the code can talk to APIgee and get the repsonse I want.
Thanks
Solved! Go to Solution.
I've sorted it. I wasn't setting my remote application setting variables correctly when publishing the application. That's me feeling like a fool forever!