Asana Backup- PAT

I’m trying to write a Python script to automate a full Asana backup using the REST API and a Personal Access Token (PAT). We are an Asana Enterprise+ customer and would like to use the script with a valid PAT for authentication.

However, when I try to create a PAT in the Developer Console, the token I receive always starts with 2/..., which appears to be an OAuth token rather than a true Personal Access Token.

To authenticate with the API (e.g., for GET /projects), I need a PAT that starts with 1/..., as documented in your API examples and required for direct Bearer token use in scripts.

Could anyone please advise how I can generate a valid 1/... Personal Access Token?

Hi @Viktoria_Krebs,

Where are you seeing this information about the first character of a PAT? I have PATs with both 0 and 2 as their first character which both allow me to access data via the API.

Hi Viktoria,
You can generate your full access token on service account.
But I believe you should have an admin or superadmin Acess to full permissions.

@Viktoria_Krebs,

You can verify the PAT works in a very simple way at a page like this:

in case you weren’t aware.

Like Phil said, one starting with a 2 is valid; I just generated one like the a couple days ago.

Thanks,

Larry

1 Like