Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
Amazon Cognito: invalid_client when refreshing token

I'm trying to get a new accessToken and idToken by hitting the endpoint oauth2/token.

I got the refresh token from cognitoUser.authenticateUser() method in amazon-cognito-identity-js

Here's my sample request in postman:

URL (seems fine)

URL

BODY (seems fine) Postman body

HEADERS (not sure) Authorization

Authorization: Basic Base64(client_id) - i used btoa() function in JS

Note: The pool does not have a client secret no client secret

Problem: When I test this out, this is the response invalid

I believe I supplied the right data as documented here: https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html

grant_type: refresh_token
client_id: required if does not have a secret
refresh_token: refresh token here

Is there something that I'm missing or something I did wrong? I am not very familiar with the flow. Any help is greatly appreciated!

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!