Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 anyone tried the e-invoice API sandbox?

views
     
TSAmpBuster
post Apr 25 2024, 04:00 PM, updated 6d ago

Getting Started
**
Junior Member
130 posts

Joined: Jul 2005
From: Johor Bahru, Johor, Malaysia


I can't figure out how to log in using the client id and secret.

Header:
QUOTE
POST /connect/token HTTP/2
Host: preprod-api.myinvois.hasil.gov.my
accept: application/json
accept-language: en
content-type: application/json
Raw POST in UBL JSON format:
QUOTE
{"client_id":[{"_":"<<client_id>>"}],"client_secret":[{"_":"<<client_secret>>"}],"grant_type":[{"_":"client_credentials"}]}


Raw POST in normal JSON format:
QUOTE
{"client_id":"<<client_id>>","client_secret":"<<client_secret>>","grant_type":"client_credentials"}


POST form-data:
QUOTE
client_id=<<client_id>>&client_secret=<<client_secret>>&grant_type=client_credentials


The response is always:

QUOTE
{ "statusCode": 400, "message": "Bad Request" }


Anyone managed to retrieve the access token? blink.gif
danieln
post Apr 25 2024, 04:13 PM

Regular
******
Senior Member
1,263 posts

Joined: Feb 2008
did you check it have to be sent as parameter or in header?

By the way, where did you get it? I am still trying to get and try it
TSAmpBuster
post Apr 25 2024, 04:23 PM

Getting Started
**
Junior Member
130 posts

Joined: Jul 2005
From: Johor Bahru, Johor, Malaysia


QUOTE(danieln @ Apr 25 2024, 04:13 PM)
did you check it have to be sent as parameter or in header?

By the way, where did you get it? I am still trying to get and try it
*
the sdk didn't specify

send this info to sdkmyinvois@hasil.gov.my
1) Tin Number :
2) Business Registration Number :
3) Company Name :
4) Company Email :
5) Name of the Enterprise Resource Planning (ERP) system used:
TSAmpBuster
post Apr 25 2024, 04:25 PM

Getting Started
**
Junior Member
130 posts

Joined: Jul 2005
From: Johor Bahru, Johor, Malaysia


QUOTE
POST /connect/token HTTP/2
Host: preprod-api.myinvois.hasil.gov.my
accept: application/json
accept-language: en
content-type: application/json
client_id: <<client_id>>
client_secret: <<client_secret>>
grant_type: client_credentials


body blank, still didn't work
TSAmpBuster
post Apr 26 2024, 01:46 PM

Getting Started
**
Junior Member
130 posts

Joined: Jul 2005
From: Johor Bahru, Johor, Malaysia


OK I've figured it out.

Header:
QUOTE
POST /connect/token HTTP/1.1
Host: preprod-api.myinvois.hasil.gov.my
Accept: */*
Content-Length: <<variable>>
Content-Type: application/x-www-form-urlencoded


Body:
QUOTE
client_id=<<client_id>>&client_secret=<<client_secret>>&grant_type=client_credentials&scope=InvoicingAPI


normal POST to retrieve access token

This post has been edited by AmpBuster: Apr 26 2024, 01:46 PM
j0nn
post May 3 2024, 09:06 PM

Getting Started
**
Junior Member
83 posts

Joined: Jan 2018
were you able to submit the invoice? No matter how I try, only get the message: "The authenticated TIN and documents TIN is not matching"
TSAmpBuster
post May 3 2024, 09:10 PM

Getting Started
**
Junior Member
130 posts

Joined: Jul 2005
From: Johor Bahru, Johor, Malaysia


QUOTE(j0nn @ May 3 2024, 09:06 PM)
were you able to submit the invoice? No matter how I try, only get the message: "The authenticated TIN and documents TIN is not matching"
*
u have to change the supplier TIN to the one u used to register
blazeechee
post May 15 2024, 11:16 AM

New Member
*
Junior Member
9 posts

Joined: Apr 2009
Good day!
Wanna check with you all. How long do you get a reply from myinvois after sending the email requesting for ID and secret?
I have not got any reply after 1 day, and wanna know if that is normal.
If need to follow up, anyone knows how to check with them?
Thanks a lot!

This post has been edited by blazeechee: May 15 2024, 11:16 AM
TSAmpBuster
post May 15 2024, 05:03 PM

Getting Started
**
Junior Member
130 posts

Joined: Jul 2005
From: Johor Bahru, Johor, Malaysia


QUOTE(blazeechee @ May 15 2024, 11:16 AM)
Good day!
Wanna check with you all. How long do you get a reply from myinvois after sending the email requesting for ID and secret?
I have not got any reply after 1 day, and wanna know if that is normal.
If need to follow up, anyone knows how to check with them?
Thanks a lot!
*
took about 2 weeks for me

 

Change to:
| Lo-Fi Version
0.0140sec    0.24    5 queries    GZIP Disabled
Time is now: 21st May 2024 - 06:53 AM