Questions tagged [accesstoken]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

Apex Callout - Use Named Credential Password Placeholder in setEndpoint [duplicate]

I've created an Apex class to call a custom rest api endpoint for a Snowflake database. The call is pretty basic in that you just include the token and a query in the endpoint Url. I would like to use ...
Jeff Callahan's user avatar
2 votes
1 answer
83 views

Do scratch orgs have weird behaviors with connected apps? Being given "Invalid_grant" with "user hasn't approved this consumer"

I have created a scratch org and installed a connected app to it. I've set the policy to "Admin Approved users are pre-authorized". I've given the connected app access to a permission set ...
Kiet T's user avatar
  • 21
0 votes
0 answers
54 views

OAuth Token Authentication Issue

Named Credentials is setup for "ABC" and same details we are storing in ABC_Metadata__mdt. Auth. Provider is setup for "ABC" and same details we are storing in ...
Nilesh's user avatar
  • 1
1 vote
0 answers
189 views

How to Configure Named Credentials in Salesforce for External Callouts Using Client ID and Client Secret?

I'm in the process of integrating Salesforce with an external service. In our scenario, an LWC page calls a method in its Apex controller. This method then initiates an external callout to obtain a ...
Akif's user avatar
  • 15
0 votes
0 answers
32 views

Problem fetching data extensions from child business units using server to server token via SOAP API

I am currently working on a solution where I can read/write to data extensions in the following folders using a user access token. Data Extensions Shared Data Extensions Salesforce Data Extensions ...
Kimkykie's user avatar
0 votes
0 answers
101 views

Storing tokens for custom token management

I'm working with an API that does not follow typical OAuth standards and requires custom headers for passing the token. Typically I would use Named Credentials, but due to the atypical pattern it is ...
S.B.'s user avatar
  • 2,039
-1 votes
1 answer
73 views

How to Use Dropbox Access Token of Visualforce Page in Different Apex Class To Make an HTTP Callout

I have created a visualforce page to get the code initially and after the code with redirect url I'm getting the Access Token of Dropbox. After that now I'm confused that How I can use this in the ...
VINOD's user avatar
  • 3
0 votes
1 answer
285 views

Salesforce External Credentials Custom Body

I was configuring external credentials in Salesforce, but I noticed, there's no Custom Body on it, is there any way to add it using OAuth 2.0 Authentication Protocol? I'm only seeing Custom Headers ...
Erick Villamayor's user avatar
0 votes
0 answers
82 views

Any way to bulk revoke oauth tokens

So I have an app that is managing several oauth access/refresh tokens and it would be great if I revoke all the tokens I have. I am aware of the Salesforce's revoke endpoint. But it seems I can only ...
CodeBaker's user avatar
  • 301
0 votes
3 answers
708 views

Generate jwt access token for integration user

I am trying to use the new integration user license with the Salesforce API Only System Integrations profile. I created a user with a password and given them a permission set with a type of Salesforce ...
Valeriy Kutsar's user avatar
0 votes
0 answers
108 views

Retrieving User-Level OKTA Tokens for Apex Callouts

I have users who log into Salesforce with OKTA SSO. I want to use that same session/token to then make requests from Apex to cloud services with that user's authorization. The services that receive ...
S.B.'s user avatar
  • 2,039
0 votes
1 answer
272 views

Authentication API call for V1 access token doesn't work in Marketing Cloud?

I'm trying to get the v1 access token from a legacy package . Reference this DOC It is pretty straightforward POST https://YOUR_SUBDOMAIN.auth.marketingcloudapis.com/v1/requestToken Content-Type: ...
Duc Le's user avatar
  • 2,603
0 votes
1 answer
195 views

JWT Access token in salesforce

I'm struggling with a requirement. I have to generate an access_token with "header" and "payload" information encoded inside the value of the token, all of this using salesforce. I ...
Juan Antonio Flores's user avatar
-1 votes
1 answer
420 views

Token expiration for server-to-server flow

We have implemented a server-to-server flow in Java where our API server will make calls to Salesforce API. We followed the great example provided by Salesforce. However, there are two time-related ...
Eric Liprandi's user avatar
0 votes
1 answer
2k views

Unable to get an Access token using a named credential and getting a State not Send OAuth Error

I am trying to get SF access token using a named credential as that is the secure way as mention here: I am basically unable to login successfully and get the following error : No_Oauth_State&...
Strong Like Bull's user avatar
3 votes
1 answer
351 views

Where to store longer Oauth Access Tokens?

We are implementing a Custom OAuth flow not using NamedCredentials and AuthProviders. For the storage of the Access Token we planned on using a Protected Custom Setting modified by an LWC component (...
Robert Sösemann's user avatar
0 votes
1 answer
165 views

Max number of valid access tokens per client

We have observed that if you call SFMC Auth API in succession, you get different access token each time and all are valid till expiry. I wanted to know if there is some upper limit on number of valid ...
Omkar Mahajan's user avatar
0 votes
0 answers
20 views

Connected App using JWT session expires after 2 hours [duplicate]

I'm deploying a web application that makes a request to the salesforce API, I'm using JWT and a connected app to connect my web application to Salesforce. The thing is after two hours, as it shows on ...
Tom's user avatar
  • 1
0 votes
1 answer
259 views

Serialized Error when getting Access Token from Salesforce

I'm attempting to get the Salesforce Access Token using typescript and Axios. Unfortunately, I'm getting a Serialized Error. I can't figure out why. Can anyone assist me, please? import axios from '...
Huckleberry Carignan's user avatar
0 votes
1 answer
631 views

Connected App access token is generated but is immediately invalid

I have a connected app which used to work. I generated an access token and was able to use that access token to retrieve other data. However when I went back to the app after a few months of not ...
zeiddev's user avatar
  • 115
0 votes
1 answer
1k views

Getting "this session is not valid for use with the rest api" error when tried to fetch accounts & contacts data

I am completely new to Salesforce and its integration via REST API. I am writing a NodeJS server app to fetch and sync accounts and contacts data. I have configured my connected app with the following ...
Senthilkumar NJSP's user avatar
0 votes
0 answers
319 views

Is it possible to determine the reason an oauth/access token was revoked or expired?

We're using a 3rd party webform tool (FormTitan) that pushes data into Salesforce using an oauth connection. The connection was reset unexpectedly which caused the form to start failing. The message ...
duncanm's user avatar
  • 35
0 votes
1 answer
36 views

does the soql support passrole or assumerole?

our salesforce is SSO login, so means we don't know the users' credentials, but we can get the SFDC auth token and user profiles need to run the SOQL as the logged-in user, the hierarchy, the ...
Joey.Huang's user avatar
3 votes
1 answer
808 views

Comparing timestamps in SSJS

As the access token is valid for 20 mins in SFMC, I want to reuse the access token. Hence I tried to write the below code. What I am doing currently I have created a Data Extension called - tokens_DE ...
natlin's user avatar
  • 33
3 votes
1 answer
1k views

Unable to login due to missing access token parameter for Identity Service - iOS

We have a growing number of users that are getting the following error on iOS after logging in to the connected app: "Server Error Can't connect to the server: The following required parameters ...
Rozgonyi's user avatar
  • 617
0 votes
0 answers
246 views

SSO blocking Frontdoor URL logins

I'm using the frontdoor URL method to login to multiple orgs. Some have SSO and some don't. The setup works fine for all orgs. Except for one org... This org has SSO enabled and using the frontdoor ...
Harout Tatarian's user avatar
0 votes
0 answers
1k views

LWC: Trying to get Access token

I am trying to get an access token from parent salesforce org. Here is the code which I am using: fetch('https://test-dev-ed.my.salesforce.com/services/oauth2/token', { ...
Tamil's user avatar
  • 714
-3 votes
1 answer
60 views

Obtain all OAuthTokens from account

Iv'e came across this data object. I am wondering how can I fetch all of the token which are related to my account (and all of my end users as-well). I did not quite understand which and how to ...
user110170's user avatar
0 votes
2 answers
333 views

Get Salesforce access token from MC cloudpage?

I'm trying to get the Salesforce access token from a connected app in MC and can't get the response. I tried it on Postman through Form Data and could get the token though. Really appreciate who can ...
Duc Le's user avatar
  • 2,603
1 vote
1 answer
787 views

Salesforce OAuth flow - getting a new refresh token

I have setup OpenID to use Salesforce as the IDP for an external site. We are using embedded login and server side callback flow. I have a requirement to set the lifespan of the access token to 60 min ...
Ryan Werner's user avatar
1 vote
1 answer
382 views

How to prevent an user used only for integrations for logging in via interface?

In my ORG I have an user used for integrations purposes only. Some integrations are using oauth2 authentication so that third-party platforms connect to Salesforce directly. In other integrations was ...
Olavo Alexandrino's user avatar
0 votes
0 answers
567 views

Incorrect token in Salesforce Marketing Cloud (401)

I would like the get the External Key of the Data Extension related to the Journey Builder. From this step, I need to use the REST API integration and WSProxy. Then, to call the REST API, I need to ...
Ben Inm's user avatar
  • 23
0 votes
0 answers
618 views

How to increase Access Token lifespan more than 20 minutes in SFMC?

According to this documentation The lifetime of an access token is 20 minutes. They've also mentioned these considerations Follow these considerations when using the API directly and doing your own ...
compski's user avatar
  • 1,251
1 vote
1 answer
2k views

Integration to Salesforce through REST API without using consumer secret/key

I am trying to connect with the Salesforce via API call. I got the access token first by providing username, password, consumer key, consumer secret, grant_type. Then I used the access token and made ...
Kunal Das's user avatar
0 votes
1 answer
914 views

when I use in postman I recevie this error No_Oauth_State: State was not sent back

can you please resolve this issue when I try to get the new access token in the postman i receive this error No_Oauth_State: State was not sent back We can’t log you in because of the following error. ...
arun's user avatar
  • 13
4 votes
1 answer
489 views

API login after MFA enforcement

With the enforcement of MFA coming next year, I've started to test an API I wrote for a client that allows their website to talk to Salesforce. It's working fine right now, but if I enable High ...
Andrew Edmonds's user avatar
3 votes
1 answer
3k views

invalid_grant: expired access/refresh token [closed]

I'm facing a issue and I can't figure out how to fixed it. This month (2021, June) started with a issue, the access token of several clients aren't refreshing, request is getting 400 Bad Request ...
Ana's user avatar
  • 31
0 votes
1 answer
215 views

Does the accessToken from sfdx expire?

I posted earlier about the authentication with sfdx force:auth:device:login and the answer was "Sessions last indefinitely". So if that is the case, if I retreive the accessToken from sfdx ...
Chad H.'s user avatar
  • 73
0 votes
1 answer
729 views

OAuth Flow- Asp.net core and salesforce-how to fetch access token

using (var client = new HttpClient()) { var request = new FormUrlEncodedContent(new Dictionary<string, string> { { "...
Surabhi's user avatar
0 votes
1 answer
892 views

bulk api from postman is not working for me

I'm sure it's a minor thing I miss over here, but I'm trying to solve it for like 2 hours without luck. I'm trying to access the bulk API. When I'm doing it with workbench its works fine : /services/...
Salvation's user avatar
  • 1,147
0 votes
1 answer
422 views

Best authentication flow to use for Rest API without interacting or login to salesforce application?

We have web application that need to read & write data to Salesforce. For that, Web application have to authenticate with Salesforce and get access token. I refer all authentication flow mentioned ...
Viral's user avatar
  • 1
1 vote
1 answer
65 views

How to restrict access to CometD clients to certain Platform Events?

I need to publish multiple events, with different clients subscribing to different type of events. Is there a way to implement policies / permissions to different Channels? So I can restrict clients ...
Harsh Parashar's user avatar
0 votes
0 answers
2k views

Session expired or invalid on using access token

I have created a connected app in which I have selected the OAuth Scopes "Access and manage your data (api)" and "Full access (full)" through the consumer key and consumer secret ...
Akshay Vasu's user avatar
1 vote
1 answer
314 views

scratch org connection vs oAuth access token

Sometimes I wonder, with the scratch org, even if I use it after 2 days, it still allows to perform certain operations or login(with session id). But same thing if we followed with oAuth, it doesn't ...
Ysr Shk's user avatar
  • 3,104
1 vote
1 answer
1k views

Marketing Cloud - accessing REST API in a child business unit [duplicate]

I'm attempting to access a Child Business Unit using an Installed Package created in the Parent Business Unit. I am POSTing this payload { grant_type: 'client_credentials', client_id: {{ Parent ...
michael.rockway's user avatar
1 vote
0 answers
296 views

Use token and call Marketing Cloud APIs from C# via FuelSDK API

I would like to call "{authEndPoint}/v2/token" to get the token and then call the REST api to trigger the email. We are using FuelSDK reference file for salesforce connection. Please help. ...
Thakur's user avatar
  • 111
2 votes
1 answer
1k views

SSJS HTTP.Post - Why are the contents of the Response Array in string format?

I am using the SSJS Core Library HTTP.Post function to retrieve an SFMC authentication token. I have followed ssjs boilerplate from Zuzanna here: https://gist.github.com/zuzannamj/...
charliefay's user avatar
1 vote
1 answer
2k views

How does a Named Credential with a custom Auth. Provider check token validity?

When using a custom OAuth 2.0 provider as an extension of AuthProviderPluginClass for a Named Credential how does Salesforce check whether the current token is valid before attempting to request a new ...
Mossi's user avatar
  • 3,906
13 votes
0 answers
898 views

Manually Invoke Refresh on Custom AuthProviderPluginClass

I have recently implemented a custom auth plugin provider in hopes of getting away from making a token call with every request OR having to manage the token myself. I am using the Oauth 2.0 client ...
S.B.'s user avatar
  • 2,039
0 votes
1 answer
461 views

Is there a way in salesforce using soql where we can get documents owned by other users but not necessarily shared to me?

I want to collect all the documents owned by each User in Salesforce account. I have created accessToken with User A's email, where User A is a System Admin with property PermissionsModifyAllData and ...
Vivek Baranwal's user avatar