Reply
Highlighted
Contributor
Posts: 12
Registered: ‎10-09-2018

Invalid access token

I'm getting an error when trying to create a customer profile.. "The provided access token is invalid". I am using node sdk and oauth flow for merchant authenticaiton. I tested the same access token in postman to see if it works and it does. I am also refreshing the access token using the refresh token before making the request. Here is some sample code below..

 

 
let merchantAuthenticationType = new ApiContracts.MerchantAuthenticationType();
merchantAuthenticationType.setAccessToken(accessToken);
 
I'm out of ideas here and could use some help..
Contributor
Posts: 12
Registered: ‎10-09-2018

Re: Invalid access token

Just to be clear, I've been able to successfully create customer profiles using the api with the same access token. It seems that I'm only having this issue with the access token in the node sdk.

Member
Posts: 1
Registered: ‎10-19-2018

Re: Invalid access token


@jdoyle112 wrote:

I'm getting an error when trying to create a customer profile.. "The provided access token is invalid". I am using node sdk and oauth flow for merchant authenticaiton. I tested the same access token in postman to see if it works and it does. I am also refreshing the access token using the refresh token before making the request. Here is some sample code below..

 

let merchantAuthenticationType = new ApiContracts.MerchantAuthenticationType();
merchantAuthenticationType.setAccessToken(accessToken);
 
I'm out of ideas here and could use some help..

The invalid access token error simply means the token for the selected app used for posting is expired and needs to be re-authenticated. Copy the displayedaccess token from the next window that displays and then paste in the Access Token Box.