admin_api_key doesn't work with merchant account create endpoint #2027
-
Hello! I just started to set the project up properly to test pull request I am contributing and I followed through I use {
"error": {
"type": "invalid_request",
"message": "API key not provided or invalid API key used",
"code": "IR_01"
}
} could you suggest me where to look closer to debug this issue? I tried to change default one to custom -- no results. Seems like something may be missing, but not sure what exactly. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hey @trkohler, could you please confirm which API you're trying to access with the admin API key? If it's one of the admin API endpoints (merchant account APIs, API keys related APIs, or payment connector APIs), you can use the admin API key. If it's for the non-admin API endpoints (payments APIs or refunds APIs), you'll need to create an API key for your merchant account and use that API key instead. |
Beta Was this translation helpful? Give feedback.
-
I am trying to follow set up guide, here are lines I am stucked at @SanchithHegde 5. Open the ["Merchant Account - Create"][merchant-account-create] request,
switch to the "Body" tab and update any request parameters as required.
- If you want to use a different connector for making payments with
than the provided default, update the `data` field present
in the `routing_algorithm` field to your liking.
Click on the "Send" button to create a merchant account
(You may need to "create a fork" to fork this collection to your own
workspace to send a request).
You should obtain a response containing most of the data included in the
request, along with some additional fields.
Store the merchant ID and publishable key returned in the response. from the instruction I understood that admin api key from |
Beta Was this translation helpful? Give feedback.
-
Yes, you're right, the admin API key must be used for creating a merchant account. Just confirming that you're indeed hitting your local server, could you please check the value of the |
Beta Was this translation helpful? Give feedback.
-
thank you, it's true, I've not noticed baseUrl was pointing to sandbox! |
Beta Was this translation helpful? Give feedback.
Yes, you're right, the admin API key must be used for creating a merchant account.
Just confirming that you're indeed hitting your local server, could you please check the value of the
baseUrl
collection variable? It should be something likehttp://localhost:8080
instead of our sandbox environment URL,https://sandbox.hyperswitch.io
.