Support Questions

Find answers, ask questions, and share your expertise

StandardOauth2AccessTokenProvider & InvokeHTTP - not working

avatar
Frequent Visitor

I try get json from API with help InvokeHTTP.

In area Request OAuth2 Access Token Providers i used StandardOauth2AccessTokenProvider

  • 08:52:01 UTC
    ERROR
    StandardOauth2AccessTokenProvider[id=2e9e7bd4-019a-1000-f83f-1ef5f5d2d56d] OAuth2 access token request failed [HTTP 400], response:
    {"error":"unsupported_grant_type","error_description":"The authorization grant type is not supported by the authorization server.","hint":"Check that all required parameters have been provided","message":"The authorization grant type is not supported by the authorization server."}
4 REPLIES 4

avatar
Frequent Visitor
  1.      Направляем POST-запрос на адрес: https://iflat.io/api/v1/oauth/token
  2.      Тело POST-запроса (request body):

{

 "username": "Ваш номер телефона",

  "password": "Ваш пароль",

  "account_id": 501,

  "client_id": 2,

  "client_secret": "wiOJc8yxgiSXDJvkYLkFcUgjtR7SrwPNiDdrt7Di",

 "grant_type": "login"

}

avatar
Community Manager

@Taisia00, Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts @MattWho @haridjh, who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Expert Contributor

@Taisia00 The supported Auth-Grant types in StandardOauth2AccessTokenProvider  are 

  • User Password 
  • Client Credentials 
  • Refresh Token 

Please update the grant-type option in the API request to the supported values . 

Check the below doc for the valid properties/options and further information.
ref doc : 
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-oauth2-provider-nar/1.28.0/or...

If the above suggestion helps in your requirements, please clink on "Accept as Solution" on this update.  

avatar
Community Manager

@Taisia00, Did the response assist in resolving your query? If it did, kindly mark the relevant reply as the solution to aid others in finding the answer more easily in the future. 



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: