function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gopal DasGopal Das 

Session expired or invalid in Apex REST API Newly created


I have created one rest services but not able to invoke it. I am using postman rest client in crome browser. I am able to generate the access_token but once I put that in the header as - Authentication 00D90000000m7Jo!AQoAQPBjGZ3cOw1tJqZpQYTnv0rcGoh7gXErTShgGDEXHYbGViKjmD6jcsJuzo55ypuoop1ROtqUeFtplCDIO4uPj54xF.jR then i am getting invalid session error message. My REST services type is POST .
[
    {
        "message": "Session expired or invalid",
        "errorCode": "INVALID_SESSION_ID"
    }
]

Can you please help me out on this.
Best Answer chosen by Gopal Das
Gopal DasGopal Das
User-added image

Finally it worked, need to put OAuth then space then security access token.

All Answers

Gopal DasGopal Das
User-added image

Finally it worked, need to put OAuth then space then security access token.
This was selected as the best answer
Gopal DasGopal Das
In header - "Authorization" "OAuth 00D90000000m7Jo!AQoAQPBjGZ3cOw1tJqZpQYTnv0rcGoh7gXErTShgGDEXHYbGViKjmD6jcsJuzo55ypuoop1ROtqUlCDIO4uPj54xF.jR"