Skip to main content

I am going to integrate the OAuth2 authentication with my existing apps.
The first step is to send a GET request to https://airtable.com/oauth2/v1/authorize .
But I failed on the first step.
Here is the error:

http://localhost/?error=invalid_request&error_description=%22code_challenge%22+must+be+a+valid+url-encoding+of+the+the+sha256+of+the+code_verifier+variable+generated+%28length+43%2C+alphanumeric+characters%2C+%22_%22%2C+or+%22-%22&state=e3f98sdasfdafsafdafsdasfwerwersfa03

Below are the parameters for the GET request:

  • client_id = //not exposed here
  • client_secret = //not exposed here
  • redirect_uri = http://localhost/
  • response_type=code
  • scope=data.records:read data.records:write
  • state=sadjfhkjDFHKJShk23489sldfhjksdkssdffsf // random text
  • code_challenge_method=S256
  • code_challenge=MTA4ZDJhYTQ1YTVhMGE3M2MwNTc3NmJiMzYyZTdhNDc3ZjgyNGUzN2U3NGZhYzA0ZGQ1NDAwYTE5OGM0OTMzYw
    // where the code verifier is SLAJFlksdlksfjljasldjflasjflasjflasfjisfjjd

I already encoded the code verifier with SHA256 and then base64 URL. So I do not know what wrong it is.
Can anyone help?

I found that the Code_Challenge was generated incorrectly. 
I fixed it and it is ok now


Reply