k3lly
(Kelly)
November 6, 2019, 9:29pm
1
Hi,
When I try to create a label , I’m receiving “The supplied credentials are not authorized for this resource.” error , the documentation says “Contact us to enable this functionality”. Can you help me with that please? we need to test it.
Thank you
shreya
(Shreya | Developer Advocate @ Dwolla)
November 7, 2019, 7:04pm
2
Just linking the other thread here as well for reference!
Hi @k3lly ! I can definitely get your account set up to test with labels. Would you be able to provide your Sandbox Master account ID, or any other ID related to a resource created in your Sandbox application?
k3lly
(Kelly)
November 7, 2019, 8:57pm
3
Hi shreya, Thanks for your quickly answer. Someone of my team was communicated with you to enable the access with our sandbox. now, we can connect to the api. However currently we’re receiving : “400 - Validation error(s) present. See embedded errors list for more details” with the url: https://api-sandbox.dwolla.com/{id}/lables and data: {“amount”:{“currency”:“USD”,“value”:100}}
Can you help me please know why?
Thank you!
shreya
(Shreya | Developer Advocate @ Dwolla)
November 7, 2019, 9:31pm
4
Hi @k3lly ,
It may have to do with the endpoint you’re calling. Are you trying to create a Label for a Customer? If so you’d want to make a request to the following endpoint -
POST https://api.dwolla.com/customers/{customerId}/labels
Let me know if updating the endpoint works for you!
k3lly
(Kelly)
November 7, 2019, 10:26pm
5
Hi, yes, I’m sorry…I copy the invalid url…the url that I’m trying is [https://api.dwolla.com/customers/{id}/labels and I’m getting the error mentioned.
Thanks.
shreya
(Shreya | Developer Advocate @ Dwolla)
November 7, 2019, 10:29pm
6
Are you able to extract the error message from the embedded list of errors? Would you also be able to post the raw request body here?
k3lly
(Kelly)
November 7, 2019, 10:31pm
7
how can I extract the error message from the embedded list? I just see the complete error returned by api.
shreya
(Shreya | Developer Advocate @ Dwolla)
November 7, 2019, 10:35pm
8
Are you using the swagger generated PHP library for Dwolla? If so, are you able to follow the following directions to view the entire error message?
Are you able to add the following after you set your access token?
DwollaSwagger\Configuration::$debug = 1;
^^ This should log out the raw request and response body, which should give information that may be helpful in debugging.
shreya
(Shreya | Developer Advocate @ Dwolla)
November 7, 2019, 10:40pm
9
Ah, it may that you are calling the Production endpoint for Labels with Sandbox credentials -
https://api.dwolla.com/customers/{id}/labels
You’ll want to change that to point to Sandbox -
https://api-sandbox.dwolla.com/customers/{id}/labels
k3lly
(Kelly)
November 8, 2019, 1:33am
10
I’m calling https://api-sandbox.dwolla.com , but I get the same error… I’m not using the php library. We’re calling native network request against the link
k3lly
(Kelly)
November 8, 2019, 1:22pm
11
how can we see the embedded errors details?
shreya
(Shreya | Developer Advocate @ Dwolla)
November 8, 2019, 5:40pm
12
Are you able to post the raw request body? I can take a look at what’s causing the error.
k3lly
(Kelly)
November 8, 2019, 6:10pm
13
sure:
{“amount”:{“currency”:“USD”,“value”:100}}
shreya
(Shreya | Developer Advocate @ Dwolla)
November 8, 2019, 7:45pm
14
Thanks Kelly,
Are you able to extract the entire request body? It would look like the one outlined in our Docs for creating a label .
POST https://api.dwolla.com/customers/{id}/labels
Content-Type: application/vnd.dwolla.v1.hal+json
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY
{
"amount": {
"currency": "USD",
"value": "10.00"
}
}
The Customer ID for whom you are trying to create label would also help.
k3lly
(Kelly)
November 8, 2019, 9:37pm
15
sure
url:
‘https://api-sandbox.dwolla.com/customers/01a20e73-0bf1-4360-8cad-ba475fd01118/labels ’,
method: ‘post’,
data: ‘{“amount”:{“currency”:“USD”,“value”:100}}’,
headers:
{ Accept: ‘application/vnd.dwolla.v1.hal+json’,
‘Content-Type’: ‘application/vnd.dwolla.v1.hal+json’,
Authorization: ‘Bearer tNGMIvbBhbSs42sVSwgxxEX5lXFoglBAOwTDgPELg6UlczeQYt’,
‘User-Agent’: ‘axios/0.19.0’,
‘Content-Length’: 41 },
shreya
(Shreya | Developer Advocate @ Dwolla)
November 11, 2019, 4:10pm
16
Thanks @k3lly !
Looks like this Customer doesn’t have any available balance which seems to be causing the error. There must be funds in their Dwolla Balance in order for them to label off some amount.
k3lly
(Kelly)
November 12, 2019, 1:46pm
17
ahh ok… great… I get it… thanks for your support
k3lly
(Kelly)
November 13, 2019, 9:57pm
19
Hi shreya,
I’m trying to test the “transfer” method, but I’m receiving:
{
code: ‘BadRequest’,
message: ‘The request body contains bad syntax or is incomplete.’
}
my request is:
{
“_links”:{
“source”:{
“href”:“https://api-sandbox.dwolla.com/labels/labelid ”
},
“destination”:{
“href”:“https://api-sandbox.dwolla.com/customers/customerid ”
}
},
“amount”:{
“value”:10,
“currency”:“USD”
}
}
Can you help me please?
shreya
(Shreya | Developer Advocate @ Dwolla)
November 13, 2019, 10:25pm
20
Hi @k3lly ,
The source and the destination in a transfer request require the funding-sources attached to Customer accounts in order to create a transaction. Try replacing those hrefs with funding-sources like in the example below, and please refer to our API reference Docs for further information.
{
"_links": {
"source": {
"href": "https://api-sandbox.dwolla.com/funding-sources/{id}"
},
"destination": {
"href": "https://api-sandbox.dwolla.com/funding-sources/{id}"
}
},
"amount": {
"currency": "USD",
"value": "10.00"
}
}
Hi This is Aravind. I am getting same error while creating the customer with type personal
Kindly help me.