In POSTMAN Go to Authorization tab
- Select OAuth 2.0 from the Type dropdown
- Select Request Headers from Add authorization data to dropdown
- Fill the following information in Configure New Token section:
- Token Name: ‘My OAuth2 token’ (You can name it as your wish)
- Grant Type: Client Credentials
- Access Token URL: https://service.endpoint.com/api/oauth2/token
- Client ID: The Client_Id generated earlier (ABCD)
- Client Secret: The Client_Secret generated earlier(1234f)
- Click on Get New Access Token button
I then need to make a get call using a bearer token.
I can get this to work in Postman, but have hit a wall trying to work out how to implement it in C#.
I need C# code for calling a REST API with an access token.