Displaying 1 message
Frederik (Frits) van Drie
12/27/2024 at 12:54
I'm used to using REST API in a corporate Microsoft environment, That triggered me to use it for getting data from geni.com.
I have created a PS 5.1 script and successfully registered it as a valid client.
I can also successfully retrieve an AccessToken.
But i'm not able to use it. Every time the error states: {"message":"You must be logged in or have an access token in order to call this API"}
When i copy an AccessToken from the explorer, it works.
Its necessary to work with PS 5.1. I tried both Invoke-RestMethod and Invoke-WebRequest cmdlets, with all parameters in the uri and passed via Headers.
Its not clear to me how to retrieve a valid AccessToken without manually starting a browser and visit the Api explorer.
Help is welcome
rails-1a-013