LoginSignup
0
0

Postman のまとめ

Last updated at Posted at 2022-09-15

まとめページに戻る

まとめN~Z

設定

Error

I tried it in another hands-on org. There, it worked. If a #Trailhead Support specialist wants to take a look what the issue might have been, I have the org id handy. Otherwise this question can be considered closed. :-)

別のハンズオン組織で試してみました。そこで、うまくいきました。 #Trailhead サポート スペシャリストが問題の原因を調べたい場合は、組織 ID を用意しておきます。それ以外の場合、この質問は終了したと見なすことができます。 :-)

image.png

Not sure if you got it but you have to repeat the process of getting a new Access Token. There is a time expiration on each token so you need to assign a new token. In Postman on your root directory on the left called Salesforce Platform API click that. Scroll to the bottom and click the button to get a new Access Token and assign it. While you are there probably delete your old ones so you don't confuse it with an expired token.

取得したかどうかはわかりませんが、新しいアクセス トークンを取得するプロセスを繰り返す必要があります。各トークンには有効期限があるため、新しいトークンを割り当てる必要があります。左側のルート ディレクトリにある Postman で、Salesforce Platform API という名前をクリックします。一番下までスクロールしてボタンをクリックし、新しいアクセス トークンを取得して割り当てます。期限切れのトークンと混同しないように、おそらく古いものを削除してください。

image.png

I was able to authenticate now after switching the sandbox and clearing caches,


image.png

Salesforce プラットフォーム API に接続しようとすると、Postman OAuth 呼び出しで接続エラーが発生します。どうすれば解決できますか?

I figured out a solution to the problem. I had to launch my playground from the previous step, then log out from it. When I then pressed the button in Postman to obtain the auth token, it took me to the Salesforce login screen. Once I logged in, it was able to generate the token.

私は問題の解決策を見つけました。前のステップからプレイグラウンドを起動し、ログアウトする必要がありました。Postman で認証トークンを取得するボタンを押すと、Salesforce のログイン画面が表示されました。ログインすると、トークンを生成できました。

I just realized the Allow OAuth Username-Password Flows was disabled. I just enabled that and it's working.

If someone else faces this problem, this could be a possible solution (combined with the IP restriction property).

[OAuth ユーザー名とパスワードのフローを許可する] が無効になっていることに気づきました。それを有効にしただけで機能しています。

他の人がこの問題に直面した場合、これが解決策となる可能性があります (IP 制限プロパティと組み合わせる)。

that showed the problem - in Postman, "Content-Type" Header for the request was set to "application/x-www-form-urlencoded", and that produced this error. I've changed it to "text/plain", and got a proper response.

これは問題を示しています。Postman では、リクエストの「Content-Type」ヘッダーが「application/x-www-form-urlencoded」に設定されており、このエラーが発生しました。 「text/plain」に変更したところ、適切な応答が得られました。

認証エラー

image.png

Did you click the Allow button after selecting the org?
I got the same error when I clicked the Deny button.
image.png

image.png

I just enabled the popup settings to give allow popup.

Getting Error: getaddrinfo ENOTFOUND tomtom-uat.sandbox.my.salesforce.com

Check if your URL path is having any space or unexpected character. Occurred with me because there was space.

https://community.postman.com/t/postman-monitor-error-getaddrinfo-enotfound/3149/4

It doesn't appear that you have logged in with Postman

Issue resolved, I should have called the connected app 'Postman' :)

Pが大文字でなかったみたいです

I got my mistake. To resolve this challenge. Very important is- we need to create a new playground and setup CORS in the newly created playground. Which i had missed

私の間違いでした。この課題を解決するには。非常に重要なことは、新しいプレイグラウンドを作成し、新しく作成したプレイグラウンドで CORS をセットアップする必要があることです。私が見逃していたもの

その他のエラー

INVALID_SESSION_ID

The INVALID_SESSION_ID error when using Postman on Salesforce Platform API can occur due to various reasons, including session expiration, IP restrictions, or incorrect session handling. Here are some potential solutions to address this issue:

  1. Refresh the OAuth Access Token: The OAuth access token might have expired, causing the session to become invalid. Try refreshing the access token using the refresh token obtained during the initial authentication process.

  2. Verify IP Restrictions: Salesforce might have restrictions on IPs that can access the API. If you're using a different IP address than when you initially authenticated, you might need to add your IP to the allowed list in Salesforce security settings.

  3. Check Session Handling: Ensure that Postman is handling the session correctly. This might involve setting the appropriate headers and maintaining the session ID throughout your API calls.

  4. Use a Different API Endpoint: Try using a different API endpoint that doesn't involve redirects. Redirects can sometimes interfere with Postman's session handling.

  5. Clear Postman Cache: Sometimes, cached data in Postman can interfere with API calls. Try clearing Postman's cache and cookies to eliminate any potential conflicts.

  6. Validate Connected App Settings: Double-check the settings of your connected app in Salesforce. Make sure the app has the necessary permissions to access the API endpoints you're using.

invalid client_id

I just realized the Allow OAuth Username-Password Flows was disabled. I just enabled that and it's working.

If someone else faces this problem, this could be a possible solution (combined with the IP restriction property).

[OAuth ユーザー名とパスワードのフローを許可する] が無効になっていることに気づきました。それを有効にしただけで機能しています。

他の人がこの問題に直面した場合、これが解決策となる可能性があります (IP 制限プロパティと組み合わせる)。

invalid token, password, or username

パスワードフィールドにトークンまたはパスワードを単独で使用しているようです。 API の場合、そのフィールドのパスワードとトークンを連結する必要があります。

It seems like you might be using the token or password alone for the password field. For the API, you will need to concatenate the password and the token for that field.

<urn:username>yourOrgUserMail</urn:username>
<urn:password>yourPasswordYourSecurityToken</urn:password>
    , example -> <urn:password>pass123Token123</urn:password> (literally copy and pa

Error: Invalid host for auth URL.

I was able to receive the token after quitting the AWS VPN Client. Everything is good to go now

AWS VPN Client を終了するとトークンを受け取ることができました。もう大丈夫です

"code": 184, access_token is invalid, unknown, or malformed

200の返答

image.png

Since a code of 200 is returned, I think that the login was successful.
I don't think there is any processing specified other than login.

コード200が返ってくるのでログインは成功していると思います。
ログイン以外の処理は指定されていないと思います。

railhead Postman モジュールに戻ることができました。Salesforce で新しい取引先レコードを作成しないという要求の原因となった POST エラーは機能しています。Postman Desktop Agent - Postman Agent: For Mac, Windows, & Linuxの実行が修正の理由だと思いました。しかし、エージェントを終了しても、POST 要求によってレコードが作成されました。もう 1 つの違いは、「標準」組織ではなく、開発者サンドボックス組織に対して要求を実行することでした。Salesforce でも CORS エラーを回避するためにエントリを設定する必要はありません。

password と security tokenでは &は使えないかも 500 error

image.png

Is &&& part of the security token?

urn:passwordpass123Token123 (literally copy and paste your security token right after your password)

https://developer.salesforce.com/forums/?id=906F00000008kPRIAY

This is part of the password. I changed my password and removed these characters. The error is gone). Thank you very much. Everything ingenious is simple.

Quick Start: Connect Postman to Salesforce

I solved this. 'Event Platform' is under 'Salesforce Platform APIs', not 'Salesforce APIs'.

これで解決しました。 「Event Platform」は「Salesforce API」ではなく「Salesforce Platform API」の下にあります

Bulk API2 での問題

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0