cancel
Showing results for 
Search instead for 
Did you mean: 

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..
jdoyle112
Contributor
2 REPLIES 2

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.

jdoyle112
Contributor

@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.

Woods008
Member