Hi
I try read info of lead with /rest/v1/lead/{leadId}.json and my just generated access token.
but i got
{"requestId":"1323#160e319bb3f","success":false,"errors":[{"code":"600","message":"Access token not specified"}]}
how can i get specified access token?
regards,
Solved! Go to Solution.
You use the /identity endpoint to get an OAuth bearer token using your client_id and client_secret.
You include that bearer token either as a query parameter (access_token=<token>) or as the HTTP Authentication: bearer <token> header.
And you need to expect the bearer token to expire within an hour, so you get a new one from /identity when that happens.
This is all quite clearly spelled out in the developer docs...
From the /identity endpoint... surely you were already doing this when working on the other REST API question you posted today?
Hi
thank you, replace "rest" to "identity", right?
but i change from
https://004-btr-463.mktorest.com/rest/v1/lead/3864423.json&access_token=key
to
https://004-btr-463.mktorest.com/identity/v1/lead/3864423.json&access_token=key
doesn't work
no, in fact, all i have to do is:
step 1: find changed lead record
step 2: read(get) them
step 3: update to my system.
now is on step 2.
You use the /identity endpoint to get an OAuth bearer token using your client_id and client_secret.
You include that bearer token either as a query parameter (access_token=<token>) or as the HTTP Authentication: bearer <token> header.
And you need to expect the bearer token to expire within an hour, so you get a new one from /identity when that happens.
This is all quite clearly spelled out in the developer docs...
Hi
again, thank you.
i found the reason, my mistake.
https://004-btr-463.mktorest.com/identity/v1/lead/<lead id>.json?access_token=<my AT>
not
https://004-btr-463.mktorest.com/identity/v1/lead/<lead id>.json&access_token=<my AT>