How do I fix the 401 Invalid authorization bearer is passed (invalid_grant) error when attempting to do a REST call to https://api.partnercenter.microsoft.com/v1/offers?country=US

PaulRusso-8946 45 Reputation points
2023-08-10T19:26:17.31+00:00

I followed these instructions to get a access_token to make a REST call to the offers api in partnercenter.

{
    "token_type": "Bearer",
    "expires_in": "3599",
    "ext_expires_in": "3599",
    "expires_on": "1691697809",
    "not_before": "1691693909",
    "resource": "https://graph.windows.net",
    "access_token":"***"
}

I set the Authorization and Accept headers to make a GET request to https://api.partnercenter.microsoft.com/v1/offers?country=US

following these instructions

What returns is 401 Invalid authorization bearer is passed (invalid_grant)

Is the resource correct in the JSON above to make that call?

What else should I check?

Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
355 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Jayanthan Sivaloganathan 0 Reputation points
    2024-10-21T12:46:00.0366667+00:00

    Is this sorted? I am facing the same issue: Bearer error="invalid_token."

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.