Trouble Getting Account ID via API – Invalid Token on Refresh

Hi there,

I’m trying to retrieve my AWeber account ID via the API.

I understand it’s not visible directly in the dashboard (only list IDs appear), so I’ve been trying to access the /accounts endpoint via the API. I’ve tried both version 1.0 and version 2.0 of the AWeber API.

I’m following the OAuth2 flow using my client ID and client secret, and I can successfully generate a refresh token. However, every time I attempt to use the refresh token to get a new access token, I receive an invalid_token error — even when the token is freshly generated.

I’ve double-checked my credentials and followed the docs carefully, but still no luck.

I’d appreciate any help with:

  1. Confirming if there’s any way to get my account ID from within the AWeber dashboard.
  2. Understanding why I keep receiving invalid_token errors when using the refresh flow on both v1 and v2 of the API.

Thanks in advance for any insight!

Hey Dave, welcome in! We did receive your email regarding your question and our engineers will be following up there with more information.

Let us know if you have any other questions in the meantime.

1 Like

Hi Dave,

Noting Amanda’s reply above..

Additionally, unless you have a very specific need for something that a standard AWeber web form can’t do, you should consider using standard web forms. They are a lot easier to setup and they automatically get you bot protection from adding a huge amount of garbage to your subscriber list that their one off API integration isn’t going to get them.

If it’s just full style control you’re looking for, you can also do that with the standard AWeber web form. Just grab the HTML snippet that’s provided from any of the forms and customize however you desire.

1 Like

Hi Tom,

Thanks for the response. I hadn’t considered using a Sign Up Form from the Aweber side (don’t know why I didn’t think of that) but that’s actually much easier and I’ve since employed that instead of messing around with the API. I hope I can withdraw my request to your development team.

Thanks again,
David

2 Likes

Perfect, thanks for the letting us know Dave.

I suspected that might be the case, but you never know.