Question

Create OAuth2 with responseCode in header

  • 29 March 2022
  • 1 reply
  • 4 views

Userlevel 4
Badge +18

I have a working Postman script for an OAuth2 connection.

When I look at the raw headers it shows that it sends the following headers:

Content-Type: application/x-www-form-urlencoded
Authorization: Basic QjIzRkI3RUU5RTZDRZZZQTRCRDJGNjVEOUM5ZZZxNjE6QzAzM0ZDOTU0RjM5NDQ1Qjg2RjdCOUQ1QzlGQzQ2MDYwM0Q1QkUwNEIzMEE3ZZZDMzFCMTI5NzM5M0MxQUMwRQ==
User-Agent: PostmanRuntime/7.29.0
Accept: */*
Cache-Control: no-cache
Postman-Token: a8126467-b10d-4a59-b116-f8a6d1160aa8
Host: projectlocation.relaticsonline.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 182
Cookie: SESSION_START_COOKIENAME_29C5C999-84D0-4D23-A8F0-F888A8C64C78=true

But if I add a new Webservice with the OAuth2 template in FME it looks like it is sending:

https://projectlocation.relaticsonline.com/oauth2/token
 
redirect_uri=https://localhost/
client_id=12345567890
client_secret=ASDFJKL
grant_type=authorisation_code
code=[responseCode]
 
Accept=application/json
Content-Language=en-US
Content-Type=application/x-www-form-urlencoded

I think I have to convert code=[responseCode] to Authorization=Basic [responseCode] somehow?

 

 

 

 

 


1 reply

Userlevel 4
Badge +18

I'm sorry, the error I got was that the refresh_token url was incorrect. But the settings for getting the token where correct. Everything is working.

Reply