Hi @ram ,
Below are details:
Client Id: CLIENT_ID
API key: API_KEY
My application code methods - flow:
codeVerifier: CODE_VERIFIER
codeChallenge: CODE_CHALLENGE
nylasHostUrl: https://api.eu.nylas.com/v3/connect/auth?client_id=20f1c644-c0b1-4c62-b6ac-0109aad8fcd6&redirect_uri=http://localhost:43344/api/Integration/EmailAndCalendarMasterAccountCallback&response_type=code&access_type=online&provider=google&login_hint=nylasv3@gmail.com&code_challenge=Ak2HC08a01ywI1CohFcVgmIV6CX11OjMown_Nvj7WdU&code_challenge_method=S256
code: CODE
json: {“code”:“CODE”,“client_id”:“20f1c644-c0b1-4c62-b6ac-0109aad8fcd6”,“client_secret”:“API_KEY”,“code_verifier”:“CODE_VERIFIER”,“redirect_uri”:“http://localhost:43344/api/Integration/EmailAndCalendarMasterAccountCallback",“grant_type”:"authorization_code”}
responce: {StatusCode: 401, ReasonPhrase: ‘Unauthorized’, Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
Connection: keep-alive
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
x-kong-upstream-latency: 50
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=63072000; includeSubDomains
Accept-Ranges: bytes
Cache-Control: no-store
x-kong-proxy-latency: 10
x-unique-id: 1981e2a2-edf4-41ff-8e61-59e2fb22ca01
Via: 1.1 varnish, 1.1 varnish
Date: Fri, 26 Jul 2024 09:40:40 GMT
X-Served-By: cache-qpg120109-QPG, cache-qpg120109-QPG
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1721986840.087965,VS0,VE243
Vary: Origin
Content-Length: 203
Content-Type: application/json
}, Trailing Headers:
{
}}
responseString: {“error”:“invalid_request_error”,“error_code”:401,“error_description”:“client_id is required”,“error_uri”:“Nylas Unified Auth Service API Reference”}
Now I am also sharing PostMan call details:
https://api.eu.nylas.com/v3/connect/token
{
“code”:“CJiO7tK4x0A5IYRw1XNiYcJ-IXMGZkrWKi–XOkuZ8S9oo0GyxpgUeBW8KJb_S5e5XC3IIP4X7dIgEzjKMvIP4-ttIP5X-YA”,
“client_id”:“20f1c644-c0b1-4c62-b6ac-0109aad8fcd6”,
“client_secret”:“CLIENT_SECRET”,
“redirect_uri”:“http://localhost:43344/api/Integration/EmailAndCalendarMasterAccountCallback”,
“grant_type”:“authorization_code”,
“code_verifier”: “4ebk8Yi3piz7DVqayWFLd1HXX5YFlC4GmEKrphWftNU”
}
{
“error”: “invalid_grant”,
“error_code”: 45004,
“error_description”: “Code verifier challenge failed”,
“error_uri”: “Nylas Unified Auth Service API Reference”,
“request_id”: “ee26a152-6092-49a7-8550-c5d6b6e69f77”
}
If i try with my application then its asking that client id is required , you can check i have already correctly passed client id. But if we run flow in postman with same data then its asking that Code verifier challenge failed.
Please review this and investigate/test it in details - its always asking that “Code verifier challenge failed”, I believe this is api issue.
I am waiting for your quick fix please.
Thanks