Calling Api's /v4/me and /v4/accounts 401 Unauthorized Invalid or missing authorization token

Dear team,

Good Day !

I was created frame io Pro plan subscription account, That account type is next frame io, So frame io team suggested to me https://developer.adobe.com

Then, I was created new project into developer adobe com console and Connected products and services Selected: frame io API select added redirect URI also created project service like this screen shot

Then, I was Node js implement code like this

const clientId = “c497d062ba75497ab9f93506277a0bdf”;

const clientSecret = “p8e-wNDB33w-kcYoPgXKyaR6rm63zWN0WXzb”;

const redirectUri = “https://manju-backend-yeor.onrender.com/api/frameio/callback”;

// STEP 1: Redirect user to Adobe Login

app.get(“/auth”, (req, res) => {

const authUrl = new URL(“https://ims-na1.adobelogin.com/ims/authorize/v2”);

authUrl.searchParams.set(“client_id”, clientId);

authUrl.searchParams.set(“redirect_uri”, redirectUri);

authUrl.searchParams.set(“response_type”, “code”);

authUrl.searchParams.set(“scope”, “openid offline_access email profile”);

authUrl.searchParams.set(“state”, “random123”);

// Redirect user to Adobe login

res.redirect(authUrl.toString());

});

// STEP 2: Adobe redirects here with ?code=AUTH_CODE

app.get(“/callback”, async (req, res) => {

const code = req.query.code;

if (!code) {

return res.status(400).send("Missing authorization code");

}

console.log(" Authorization Code:", code);

const tokenUrl = “https://ims-na1.adobelogin.com/ims/token/v3”;

// Create Basic Auth header

const authHeader =

"Basic " +

Buffer.from(\`${clientId}:${clientSecret}\`).toString("base64");

// Prepare request body

const params = new URLSearchParams({

code,

grant_type: "authorization_code",

redirect_uri: redirectUri,

});

try {

const tokenResponse = await fetch(tokenUrl, {

  method: "POST",

  headers: {

    "Authorization": authHeader,

    "Content-Type": "application/x-www-form-urlencoded",

  },

  body: params.toString(),

});



const tokenData = await tokenResponse.json();



console.log("Token Response:", tokenData);



res.send(\`

  <h2> OAuth Success!</h2>

  <p><b>Access Token:</b> ${tokenData.access_token}</p>

  <p><b>Refresh Token:</b> ${tokenData.refresh_token}</p>

  <p><b>Expires In:</b> ${tokenData.expires_in} seconds</p>

\`);

} catch (err) {

console.error(" Token Error:", err);

res.status(500).send("Error exchanging authorization code for token");

}

});

When ever I was run code taken new tab in chrome put url like

After that login current emailID

Then, I got Credentials Access token and Refresh Token Like this

After that i was taken Access Token only, After that /v4/me and /v4/accounts api’s call like this then i got error 401

So, Please check it what happen, I am checked multiple ways but i got same issue.

I believe I’ve followed all the steps correctly, but I’m still facing an issue. Could you please look into it as soon as possible? I’ll be waiting for your response.

hi @webworksco getting 401 error when accessing /v4/me most likely means you have an issue with your frame.io account not being linked to an Adobe ID. You can solve that by following these steps: Connecting to Adobe authentication | Frame.io V4 Knowledge Center

hi @CharlieAnderson my profile page like this

then I am select to manage on Adobe then next page open like

I was enable all buttons but i got same issue

Please check it.

@webworksco I just sent you a DM

Hi @CharlieAnderson

I got same error

Could please check it My account is what happen is there any enable please check it

hi @webworksco If you could respond to my DM I’m happy to help you there. It will require sensitive information so I don’t want to have that conversation publicly on the forums.

1 Like

For anyone in the future, the issue was a missing additional_info.roles scope in the initial request.

1 Like