Why am I encountering an expired token issue when setting up the PipeDream connect following the official documentation?

This topic was automatically generated from Slack. You can find the original thread here.

Hey everyone, I have an issue. I’m trying to set up the PipeDream connect. I’m following the official documentation. But after every time I do this, I have the same bug.

So I follow the two steps.

First, I set up the oauth token. Then using that i get the connect token. And then when I create the connect URL and click on it, it always says it’s expired.

I’m not sure what I’m doing wrong, I’m following the documentation, and I always get this issue.

https://pipedream.com/_static/connect.html?token=ctok_cd53d45c175ff3bd10985763dc1bfc78&connectLink=true&app=google_sheets

Are creating the token in development or production?

https://pipedream.com/docs/connect/environments

curl -X POST https://api.pipedream.com/v1/connect/proj_oLsDBz7/tokens \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9.eyJqdGkiOiJlZTgyMzkwNS0yOTlmLTQxNmUtYjA3My01ZDZkODZiZjRiNGUiLCJpc3MiOiJodHRwczovL2FwaS5waXBlZHJlYW0uY29tIiwiZXhwIjoxNzMxNDIzMjg4LCJuYmYiOjE3MzE0MTk2ODgsImlhdCI6MTczMTQxOTY4OCwiYXVkIjpbImFwaSIsImNhdGNoZXIiXSwic3ViIjoib19iTEk4YnlLIn0.YgjAkAJdxTKCCe8zuy9zFvMYnUV0uaEPn0dBKoMWItMr-wkHF-LZNLuFvZjS07ONmhY5Lq1DmcOjN2ZQG-bPDA" \
  -d '{
    "external_user_id": "your-external-user-id",
    "environment": "development"
  }'

I did development.

But I remember also having the same issue with production.

Maybe I am doing something wrong. I am new to this, so highly likely its possible.

I am using the pipedream’s OAuth Client.

I only have one project in my account and I use that as the project id.

(venv) adi@adi-linux:~/Repos/win/pipedream/connect_link$ curl -X POST https://api.pipedream.com/v1/oauth/token   -H "Content-Type: application/json"   -d '{
    "grant_type": "client_credentials",
"client_id": "QKqHQFRmA8ZUAz_4gToL3ekxxzxv6umBkYNzdeLBLBw",
    "client_secret": "B7prnURW4vfV9SMZ-myq_iWRWbfzgiLAFJMvsSmYe-8"
  }'

I am also dumping this here in case its helpful for debugging. That is the id/secret combo.

(I will delete these client credentials later).

So basically I do those two steps and then open the connect url. But everytime I open that it says link expired.

does that information help? Would you need any other info please let me know?

Any pointers would help. I am stuck on this for some hours and lost :confused: Would greatly appreciate any help.

Here is a link I generated just now with this :

Pipedream Connect

Same issue :confused:

Can you open Chrome dev tools when you open that link and look for the /validate network request and look for the response?

I believe you’re the token is being created in production, which would explain why it isn’t working with Pipedream’s official OAuth client

Hold on let me do that.

{"app":{"id":"app_168hvn","name_slug":"google_sheets","name":"Google Sheets","auth_type":"oauth","description":"Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.","img_src":"https://assets.pipedream.net/s.v0/app_168hvn/logo/orig","custom_fields_json":"[]","categories":["Productivity"]},"oauth_app_id":"oa_G7AiAg","success_redirect_uri":null,"error_redirect_uri":null,"success":false,"error":"This OAuth app isn't allowed in production. Please configure a custom OAuth client and try again.","project_environment":"production","project_app_name":"AI Podcasting","project_support_email":"adi@aipodcast.ing","project_logo_url":"https://assets.pipedream.net/s.v0/connect/projects/proj_oLsDBz7"}